/// <summary> /// Initializes a new instance of the <see cref="IntervalWorkerBase"/> class. /// </summary> /// <param name="name">The name.</param> /// <param name="period">The period.</param> /// <param name="mode">The mode.</param> protected IntervalWorkerBase(string name, TimeSpan period, IntervalWorkerMode mode) { Name = name; Period = period; QuantumTimer = new IntervalTimer(mode == IntervalWorkerMode.HighPrecision, OnQuantumTicked); CycleClock.Restart(); }
/// <summary> /// Initializes a new instance of the <see cref="IntervalWorkerBase"/> class. /// </summary> /// <param name="name">The name.</param> /// <param name="period">The period.</param> /// <param name="mode">The mode.</param> protected IntervalWorkerBase(string name, TimeSpan period, IntervalWorkerMode mode) { Name = name; Period = period; QuantumTimer = new StepTimer(OnQuantumTicked); Mode = mode; CycleClock.Restart(); }