Linux C计时

#include <sys/time.h>

long gettime() {
    timeval t;
    gettimeofday(&t, NULL);
    return 1000*t.tv_sec + t.tv_usec/1000;
}
原文地址:https://www.cnblogs.com/jhc888007/p/11835489.html