摘要:
linux c1.(linux)获取时间,精确到us,struct timeval,使用gettimeofday()获取当前#include #include "stdio.h"
int main(void)
{
struct timeval tv;
gettimeofday(&tv,NULL);
printf("now tv_sec=%d,tv_usec=%d\n",tv.tv_sec,tv.tv_usec);
}
2.(glibc)日历时间 ,time_t,使用time()获取当前time()returns the time as the n 阅读全文