摘要: 计算一个函数调用花费了多长时间。 int gettimeofday(struct timeval *tv,struct timezone *tz); //tz一般使用NULLstrut timeval { long tv_sec; /* 秒数 */ long tv_usec; /* 微秒数 */ }; #if OSL_DEBUG_LEVEL >1timeval aLast; float timeuse; gettimeofday(&aLast,NULL); #endiffunction(); //测量此函数执行所花费的时间#if OSL_DEBUG_LEVEL >1time 阅读全文
posted @ 2012-08-16 17:02 MayFirst 阅读(343) 评论(0) 推荐(0) 编辑