3 ms·
rationals might be a better solution since they could use whatever divisor they want without throwing away precision. I'm not very familiar with MS apis but if
by jgh 8y ago
rationals might be a better solution since they could use whatever divisor they want without throwing away precision. I'm not very familiar with MS apis but if they provide some facility for telling you how many 'ticks' there are per second you could use that to generate the divisor as well.
edit: I see you did link to the API!
- TeMPOraL 8y agoThere is. To save people the click, there's a pair of functions - QueryPerformanceCounter and QueryPerformanceFrequency. QPC gives you ticks, QPF gives you ticks per second, so QPC / QPF is the rational you seek.