4,436
社区成员
发帖
与我相关
我的任务
分享
int gettimeofday(struct timeval *tv, struct timezone *tz);
returns the time as the number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
struct timeval {
time_t tv_sec; /* seconds */
suseconds_t tv_usec; /* microseconds */
};
The usleep() function suspends execution of the calling thread for (at least) usec microseconds. The sleep may be lengthened slightly by any sys‐
tem activity or by the time spent processing the call or by the granularity of system timers.