/*
* sys_time.c
*
* Created on: 2011-11-15
* Author: snape
*/
#include <time.h>
#include <stdio.h>
int main(int argc, char **argv) {
time_t start, end;
time(&start);
sleep(5);
time(&end);
fprintf(stderr,"start[%d] end[%d] time[%f]\n",start,end,difftime(end,start));
return 0;
}
时间 日期 -- 系统时间 time_t 结构,time difftime 函数
最新推荐文章于 2024-08-14 15:31:10 发布