#include <stdio.h>
#include <sys/time.h>
/**********************
*name:gettimeofday.c
*author:QG
*time:2015-05-13
*description:
***********************/
int main()
{
//struct timeval *tv;
struct timeval tv;
int ret;
ret = gettimeofday(&tv,NULL);
//if(ret == 0)
//{
printf("get the gettimeofday :seconds: %d,microseconds :%d\n",tv.tv_sec,tv.tv_usec);
//}
return 0;
}
时间编程--gettimeofday(获取高精度时间)
最新推荐文章于 2023-07-05 11:56:54 发布