error: ‘gettimeofday’ was not declared in this scope gettimeofday(&tv, NULL); 需要包含头文件 #include <sys/time.h>