Straight from my win32.hlp file, in the section on TimeGetTime:
quote:Note that the value returned by the timeGetTime function is a DWORD value. The return value wraps around to 0 every 2^32 milliseconds, which is about 49.71 days.This can cause problems in code that directly uses the timeGetTime return value in computations, particularly where the value is used to control code execution. You should always use the difference between two timeGetTime return values in computations.
Repeat: You should always use the difference between two timeGetTime return values in computations.
Use the difference and you''re totally fine. Also, note that GetTickCount returns a DWORD so would have the same issue - that''s why you''ll never see anything other than (NewTime - OldTime) in a tutorial on timing. Everyone uses relative timing and nobody gets hurt - right?