]> git.proxmox.com Git - wasi-libc.git/blob - libc-top-half/musl/src/time/timespec_get.c
Update to musl 1.2.3.
[wasi-libc.git] / libc-top-half / musl / src / time / timespec_get.c
1 #include <time.h>
2
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)
6 {
7 if (base != TIME_UTC) return 0;
8 int ret = __clock_gettime(CLOCK_REALTIME, ts);
9 return ret < 0 ? 0 : base;
10 }