How are you trying to use it? I often use the Win32 equivalent when checking for a duration that I know will be less than 49 days. For example, the following code will always work.
DWORD start = timeGetTime(); DoSomthingThatTakesLessThen49Days(); DWORD duration = timeGetTime() - start;
Even if timeGetTime DoSomthingThatTakesLessThen49Days over when calling DoSomthingThatTakesLessThen49Days duration , it will still be correct.
Please note that the following code cannot complete when rollover.
DWORD start = timeGetTime(); DoSomthingThatTakesLessThen49Days(); if (now + 5000 < timeGetTime()) { }
but it can be easily rewritten to work as follows
DWORD start = timeGetTime(); DoSomthingThatTakesLessThen49Days(); if (timeGetTime() - start < 5000) { }
source share