Beispiel #1
0
        public void NearZeroElapsed()
        {
            TimePoint start = TimePoint.Now();

            TimeSpan elapsed = start.Elapsed();

            elapsed.TotalMilliseconds.Should().BeLessThan(1.0d);
        }
Beispiel #2
0
        public void FiveMillisecondsElapsed()
        {
            TimePoint start = TimePoint.Now();

            Thread.Sleep(5);
            TimeSpan elapsed = start.Elapsed();

            elapsed.TotalMilliseconds.Should().BeApproximately(5.0d, 2.0d);
        }