Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Windows provide a monotonically increasing clock to applications

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.

like image 981
gyrolf Avatar asked Oct 17 '08 06:10

gyrolf


1 Answers

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.

like image 169
Greg Hewgill Avatar answered Oct 18 '22 11:10

Greg Hewgill