为什么MinGW gcc 8.2.0`-std = c11`不支持`timespec_get()`?

时间:2020-02-01 19:27:09

标签: c mingw iso c11

请参阅自{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' undeclaredgcc -std=c11 snippet.c

#include <time.h>

int main() {
   struct timespec tstart;
   timespec_get(&tstart, TIME_UTC);
   return 0;
}

那是为什么?

0 个答案:

没有答案