Referring to the N1570 Committee Draft of the ISO/IEC 9899:201x Programming languages - C which dates back to April 12, 2011, there should be a function timespec_get()
(see 7.27.2.5).
But MinGW gcc version 8.2.0 returns warning: implicit declaration of function 'timespec_get'
, and error: 'TIME_UTC' undeclared
, when compiling the following code snippet with gcc -std=c11 snippet.c
:
#include <time.h>
int main() {
struct timespec tstart;
timespec_get(&tstart, TIME_UTC);
return 0;
}
Why is that?