예제 #1
0
        public void ShouldAddMilliseconds()
        {
            // Given
            const double value = 123.456;
            var          time  = new Time(12345);

            // When
            var result = time.AddMilliseconds(value);

            // Then
            Assert.AreEqual(time.TotalSeconds + 0.001 * value, result.TotalSeconds, TimeInaccuracy);
        }
 /// <summary>
 /// Moves the activity's time forward one millisecond so that it sorts into the true order
 /// when two activities with the exact same time are recorded.
 /// </summary>
 public void ShiftTimeForwardOneMillisecond()
 {
     Time = Time.AddMilliseconds(1);
 }
예제 #3
0
파일: TimeBanner.cs 프로젝트: Hrubon/pasch
 private void Ticker_Tick(object sender, EventArgs e)
 {
     Time = Time.AddMilliseconds(ticker.Interval);
     Redraw();
 }