3 ms·
I'm not sure about details but as far as I remember Windows CE uses a brilliant approach to fix this bug. System tick count is set to value equal three minutes
by yatsyk 15y ago
I'm not sure about details but as far as I remember Windows CE uses a brilliant approach to fix this bug. System tick count is set to value equal three minutes before overflow. And system counter overflows three minutes after OS starting. 3 minutes usually enough to load all applications that could be buggy but this time is less then usual debug session.
edit: found details:
http://msdn.microsoft.com/en-us/library/ms885645.aspx http://msdn.microsoft.com/en-us/library/ms885645.aspx
For Debug configurations, 180 seconds is subtracted to check for overflow conditions in code that relies on GetTickCount. If this code started within 3 minutes of the device booting, it will experience an overflow condition if it runs for a certain amount of time.
- bdonlan 15y agoLinux does this too, but unconditionally: http://lxr.linux.no/linux+v3.1.1/include/linux/jiffies.h#L163 http://lxr.linux.no/linux+v3.1.1/include/linux/jiffies.h#L16... Note that this particular timer is not directly exposed to userspace, however.
- Groxx 15y agoIncrease awareness of =/= fix, but I like the technique either way :)