Linux C计时

#include <sys/time.h>

long gettime() {
    timeval t;
    gettimeofday(&t, NULL);
    return 1000*t.tv_sec + t.tv_usec/1000;
}

 

posted @ 2019-11-11 15:40  jhc888007  阅读(753)  评论(0编辑  收藏  举报