Alex Rivera | Logout

Does Windows provide a monotonically increasing clock to applications

Asked 2008-10-17T06:56:07.157
14

This question is inspired by Does Linux provide a monotonically increasing clock to applications.

Maybe I should be more precise: I'm looking for a clock function which is strictly increasing, thus never returning the same value, independant how quick two calls follow each other.

Edit
Report

1 Answer

10

Yes, GetTickCount() does this. If you want a higher fidelity counter, QueryPerformanceCounter is also available. Neither of these counters depend on the time of day.

answered 2008-10-17T07:01:29.487

Your Answer