linux 时间函数:
time/time_t 秒
ftime/ struct timeb 毫秒
gettimeofday/struct timeval us
clock_gettime/ struct timespec ns
gmtime/localtime/timegm/mktime/strftime/struct tm
其中
time 精度低,
ftime 已废弃,
clock_gettime 系统调用,精度高
gettimeofday vsyscall ,系统态, 开销低
定时函数,用于让程序等待一段时间或安排计划任务:
来源: http://www.cppblog.com/Solstice/archive/2014/08/21/139769.html
原文:http://www.cnblogs.com/songbingyu/p/4022658.html