C++ 计算时间间隔,精确到毫秒

#include <time.h>

 

clock_t start,ends;
 start=clock();

system("pause");

 ends=clock();
 cout<<ends-start<<endl;

 

time_t 获得时间只能精确到,clock_t 获得时间能够精确到毫秒

posted @ 2010-12-16 15:39  lucyjiayou  阅读(12365)  评论(2编辑  收藏  举报