12345678910111213141516171819202122232425 |
- using DbHelper;
- using System;
- using System.ComponentModel;
- using WCS.Core;
- namespace WCS.Service.Handlers
- {
- [Description("任务上传")]
- internal class UploadHandler : LogicHandler
- {
- public override void Start()
- {
- }
- private DateTime last = DateTime.MinValue;
- public override void Update(double milliseconds)
- {
- if ((DateTime.Now - last).TotalMilliseconds < 10000)
- return;
- last = DateTime.Now;
- Db.Do(Uploader.Upload);
- }
- }
- }
|