原文:Linux: Linux C 获取当前系统时间的时间戳(精确到秒、毫秒、微秒) gettimeofday

说明 获取当前的时间的秒数和微秒数本方法需要用到gettimeofday 函数,该函数需要引入的头文件是 lt sys time.h gt 。 函数说明 int gettimeofday struct timeval tv, struct timezone tz 示例 运行结果: second: millisecond: microsecond: sleep second second: mill ...

2019-04-11 14:36 0 11135 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM