netinet/tcp.h: add TCP_NLA_* values up to linux v5.12
[musl.git] / src / time / timespec_get.c
blob40ea9c1c32682d25b9f51279588d73f4f170e2a0
1 #include <time.h>
3 /* There is no other implemented value than TIME_UTC; all other values
4 * are considered erroneous. */
5 int timespec_get(struct timespec * ts, int base)
7 if (base != TIME_UTC) return 0;
8 int ret = __clock_gettime(CLOCK_REALTIME, ts);
9 return ret < 0 ? 0 : base;