0
点赞
收藏
分享

微信扫一扫

linux下的GetTickCount

茗越 2022-07-27 阅读 67


unsigned long GetTickCount()
{
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC,&ts);
return (ts.tv_sec * 1000 + ts.tv_nsec/(1000*1000) );
}

cygwin下测试结果恒为0,linux实测结果正确。

举报

相关推荐

0 条评论