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

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

posted on 2022-08-03 19:47  闻缺陷则喜何志丹  阅读(8)  评论(0编辑  收藏  举报  来源