select: overhaul for time64
[musl.git] / src / time / time.c
blobad0480f9ea942bcab3cd2257a61fbd4637e161d7
1 #include <time.h>
2 #include "syscall.h"
4 time_t time(time_t *t)
6 struct timespec ts;
7 __clock_gettime(CLOCK_REALTIME, &ts);
8 if (t) *t = ts.tv_sec;
9 return ts.tv_sec;