and sleep

Demo of Perils of Measuring Long Intervals With

Elapsed time per 0ms
Elapsed time per 0ms
Difference: 0ms


  1. Observe that the elapsed time for both methods are the same (within a few milliseconds)
  2. Put the computer to sleep for a least a minute
  3. Wake up the computer
  4. Observe that the time is now significantly behind.