timespec timeval
时间:2010-09-15 来源:linux719
struct timespec{
__time_t tv_sec; /*seconds 秒*/
long int tv_nsec; /*nanoseconds 纳秒*/ 10-9
}
与struct timeval 不同,将结构体内成员微秒变换成纳秒
struct timeval{
time_t tv_sec; /*seconds, 秒*/
suseconds tv_usec; /*microseconds, 微秒*/10-6
}
timeval表示一个时间点,用秒、微秒来定义时间点。
相关阅读 更多 +