时间编程--gettimeofday(获取高精度时间)

来源:互联网 发布:按键精灵 调用js 编辑:程序博客网 时间:2024/05/08 14:25
#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;}
0 0