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); }
private void Ticker_Tick(object sender, EventArgs e) { Time = Time.AddMilliseconds(ticker.Interval); Redraw(); }