public override void Start() { if (Status != TimerStatus.Unstart) { //YuDebugUtility.LogError($"计时器{UniqueId}已经启动了,无法再次启动!"); return; } Status = TimerStatus.Running; StarDateTime = DateTime.Now; // 将自身注册到计时器调度器并尝试启动调度器中的原生计时器 TimerDispatcher.RegisterTimer(this); }
public override void Close() { Reset(); Status = TimerStatus.Close; TimerDispatcher.RemoveTimer(this); }