mips: add vdso support
[musl.git] / src / time / time.c
blob4b95e7527d440b05b55ca100b465cd79feff652e
1 #include <time.h>
2 #include "syscall.h"
4 int __clock_gettime(clockid_t, struct timespec *);
6 time_t time(time_t *t)
8 struct timespec ts;
9 __clock_gettime(CLOCK_REALTIME, &ts);
10 if (t) *t = ts.tv_sec;
11 return ts.tv_sec;