时间函数gettimeofday()
2013-11-18 09:56
453 查看
#include <sys/time.h> struct timeval start,end; gettimeofday(&start,NULL); gettimeofday(&end,NULL); unsigned long duration = 1000*(end.tv_sec-start.tv_sec)+(end.tv_usec-start.tv_usec)/1000; //sec->second usec->microsecond duration 毫秒格式
相关文章推荐
- 数据结构6 && 实验六:树的操作
- 递归详解
- oracle for update和for update nowait
- js事件不生效的原因
- rhel6配置本地yum源
- ccmenu里的位置
- xcode 高亮
- IPC机制--Binder
- Android 软键盘imeOptions(Done)的用法
- C++ C语言与C++区别
- 设为首页和收藏的Javascript代码(亲测兼容IE,Firefox,chrome等浏览器)
- asp.net 验证码 【Drawing.BitMap】
- 视频: 千重浪Linux系统调试技术培训 03-01-Basic-CPU-Address
- 未命名 3
- OpenCV_Mat 转 IplImage*类型
- 联合体(共用体)union
- js iframe问题
- VC 下 由进程名获取进程句柄
- 免费软件推荐:免费的局域网聊天工具!
- 未命名 3