convert 100 ticks per second to milliseconds

590 Views Asked by At

I used sysconf(_SC_CLK_TCK) to get time resolution on my pc. I got back 100 ticks per second. How do I convert that to milliseconds? I know there 1000 milliseconds in 1 second but I feel like its more complicated that since I need to account for ticks. 100t/1s 1s/1000ms = .100 milliseconds doesnt seem right.

1

There are 1 best solutions below

0
On

So you have $$ 100 \frac{\text{ticks}}{\text{sec}} = 100 \frac{\text{ticks}}{\text{sec}} \times 1,000 \frac{\text{sec}}{\text{msec}} = 100,000 \frac{\text{ticks}}{\text{msec}} $$