c/c++ 'time' was not declared in this scope Error: 'time' was not declared in this scope 解决方案: 添加头文件 #include <sys/time.h>