苗火 Nicholas
[C]gettimeofday()
2016-2-2 萧
#include <stdio.h>
#include <sys/time.h>
#include <string.h>

void test_gettimeofday(){
struct timeval tv;
struct timezone tz;
gettimeofday(&tv, &tz);
printf("tv.tv_sec = %d , tv.tv_usec = %d \n", tv.tv_sec, tv.tv_usec);
printf("tz.tz_minuteswest = %d , tz.tz_dsttime = %d \n", tz.tz_minuteswest, tz.tz_dsttime);
}
发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容