← Back to context

Comment by mortehu

6 years ago

Safe use of Microsoft Windows also requires rebooting on a slightly shorter schedule, because GetTickCount will overflow. In particular if you're running a real-time simulation which is likely to use delta time as a critical parameter, and you can't audit the code or know for a fact that it uses GetTickCount.

I've often wondered how people came to the conclusion that "Windows is unstable, you can't leave it on for more than a couple months!" due to this.

At one company I worked for, all of our National Instruments test equipment would start to fail with communication problems after about two months on our Windows XP computers. Being familiar with GetTickCount, I rebooted the computers, recorded the date, verified the next failure was 49 days later, then emailed National Instruments with a link to the GetTickCount documentation. They pushed out an update with a fix 3 days later. Oops.