Example #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();
 }
Example #2
0
        public void GetMilliseconds_WithDifferentValues_Valid(Period period, ulong expectedMs)
        {
            var ms = MillisecondsCalculator.GetMilliseconds(new Schedule(period, 1));

            Assert.AreEqual(expectedMs, ms);
        }