public virtual void SetTimer() { Timer = new Timer { Interval = MillisecondsCalculator.GetMilliseconds(Parameters.Schedule), AutoReset = true }; Timer.Elapsed += Timer_Elapsed; Timer.Enabled = true; Timer.Start(); }
public void GetMilliseconds_WithDifferentValues_Valid(Period period, ulong expectedMs) { var ms = MillisecondsCalculator.GetMilliseconds(new Schedule(period, 1)); Assert.AreEqual(expectedMs, ms); }