移植:timeGetTime() 在linux 下实现

来源:互联网 发布:erp软件是什么 编辑:程序博客网 时间:2024/04/25 18:14
#include <time.h> unsigned int timeGetTime(){        unsigned int uptime = 0;        struct timespec on;        if(clock_gettime(CLOCK_MONOTONIC, &on) == 0)                 uptime = on.tv_sec*1000 + on.tv_nsec/1000000;        return uptime;}

原创粉丝点击