精确到微秒——计算函数执行时间
by
at 2010-11-19 19:08:50
original http://my.oschina.net/xiangxw/blog/10124
include
include
include
int main() { struct timeval tpstart,tpend; float timeuse; int i; gettimeofday(&tpstart,NULL); scanf("%d", &i); /*这里计算的是scanf函数的执行时间,就是从函数执行到命令行输入回车的时...