#include<stdlib.h> #include<time.h> int main() { time_t tBegin; tBegin=clock(); //代码段 time_t tCost=clock()-tBegin; return 0; }