timespec on windows compilers

99封情书 提交于 2019-12-02 02:02:19
Grim

The function GetTickCount is usually used for that.

Also a similiar thread: C++ timing, milliseconds since last whole second

Depends on what sort of accuracy you want, my understanding is that clock and time_t are not accurate to the millisecond level. Similarly GetTickCount() is commonly used (MS docs say accurate to 10-15ms) but not sufficiently accurate for many purposes.

I use QueryPerformanceFrequency and QueryPerformanceCounter for accurate timing measurements for performance.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!