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

            Assert.AreEqual(expectedMs, ms);
        }