public void WindowsPerformanceLiasonTest_GetTicks() { WindowsPerformanceLiason underTest = new WindowsPerformanceLiason(); long firstTick = underTest.StopwatchTimestamp(); Thread.Sleep(100); long secondTick = underTest.StopwatchTimestamp(); long elapsedTicks = secondTick - firstTick; //// Dividing by Frequency gives you seconds but we want milliseconds //// Assume we're not off by more than 10 msec on a 100msec wait Assert.AreEqual(100, (1000 * elapsedTicks) / Stopwatch.Frequency, 10); }