Hacker News new | past | comments | ask | show | jobs | submit login
On Windows, how do you get time in nanoseconds in C? (nu42.com)
1 point by nanis on July 18, 2021 | hide | past | favorite | 1 comment



Short answer --- you can't and for good reason --- it won't be accurate. The best that is available is 0.1 milliseconds using the QueryUnbiasedInterruptTime API and even that value is suspect.

Extreme time accuracy is simply not attainable in a multitasking, interrupt driven environment like Windows.

And this is probably not the appropriate forum for such technical questions.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: