在头文件中添加如下定义:
#ifndef _CRT_NO_TIME_Tstruct timespec{time_t tv_sec; // Seconds ->= 0long tv_nsec; // Nanoseconds - [0, 999999999]};#endif
该代码摘自: time.h 文件, 不清楚为什么直接包含 time.h 文件仍然找不到定义
来源: http://www.bubuko.com/infodetail-2564078.html