highfidelity/hifi — pull request #3851 by ZappoMan (2014-11-21 21:36:43+00:00)
Title: fix to drift in usecTimestampNow() caused when computer sleeps

This finally fixes the problem with usecTimestampNow() that causes the "unreasonable flight time" warnings.

The problem is caused by the QElapsedTimer not progressing when the CPU is asleep. This causes the "calculated" time to basically pause when the CPU is asleep. We detect this now and if we are ever skewed by more than 10 seconds we will reset out TIME_REFERENCE

I'd like to leave this debugging code in a little bit longer so we can confirm this really fixes the problem, then I'll submit a PR next week that removes the debug code.