摘要: http://developer.51cto.com/art/201201/310974.htm 阅读全文
posted @ 2012-01-12 18:48 夏大王 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 哦,clock_gettime( ) 提供了纳秒的精确度,给程序计时可是不错哦;函数的原型如下:int clock_gettime(clockid_t clk_id, struct timespect *tp);clockid_t clk_id用于指定计时时钟的类型,对于我们Programmr以下三种比较常用:CLOCK_REALTIME, a system-wide realtime clock.CLOCK_PROCESS_CPUTIME_ID, high-resolution timer provided by the CPU for each process.CLOCK_THREAD_. 阅读全文
posted @ 2012-01-12 18:32 夏大王 阅读(574) 评论(0) 推荐(0) 编辑