#include<sys/time.h>
#include<unistd.h>
cout<<" TimeStart"<<endl;
//时间测量
struct timeval tstart,tend;
double timeUsed;
gettimeofday(&tstart,NULL);
/*待测试代码*/
/* CODE */
/*待测试代码*/
gettimeofday(&tend,NULL);
timeUsed=1000000*(tend.tv_sec-tstart.tv_sec)+tend.tv_usec-tstart.tv_usec;
cout<<" Time="<<timeUsed/1000<<" ms"<<endl;