gettimeofday函数的简单使用
#include <iostream>#include <sys/time.h>#include <cstdio>#include <unistd.h>using namespace std;void fun(){ sleep(2);}int main(){ struct timeval tp; struct ti...