问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/211257/does-windows-provide-a-monotonically-increasing-clock-to-applications