看代码: #include<iostream> #include<ctime> using namespace std; int main() { int i; time_t begin,end; begin=clock(); cout<<"**************************\n\n\n\n\n\nI love you!\n\n\n\n\n**************************"<<endl; i = ;
https://github.com/yaowenxu/Workplace/blob/master/timer/getrusagetimer.c 关键结构体: struct rusage { struct timeval ru_utime; /* user time used */ struct timeval ru_stime; /* system time used */ long ru_maxrss; /* max resident set size */ long ru_ixrss; /