I am calling into an API that needs the elapsed ticks between 2 points. In a C# version, I use Stopwatch and utilize the ElapsedTicks method (this seems to be different than ElapsedMilliseconds obviously).
In Windows API I see GetTickCount(). However this seems to return the elapsed milliseconds, not ticks. How can I accomplish the equivalent with Windows API? (Prefer language agnostic since I might be writing a few wrappers for this).
Stopwatch uses QueryPerformanceCounter internally, if it’s available.
It determines if it’s available by calling QueryPerformanceFrequency – the return value is also used to determine the frequency of the performance counter.