请参阅自{2011年4月12日开始的N1570 Committee Draft of the ISO/IEC 9899:201x 编程语言-C ,应该有一个功能timespec_get()
(请参阅7.27.2.5)。
但是,当使用warning: implicit declaration of function 'timespec_get'
编译以下代码段时,MinGW gcc版本8.2.0返回error: 'TIME_UTC' undeclared
和gcc -std=c11 snippet.c
:
#include <time.h>
int main() {
struct timespec tstart;
timespec_get(&tstart, TIME_UTC);
return 0;
}
那是为什么?