ref: b5c01b5d701dc1c3bbca24175041390a3c4a3db3
dir: /src/libc/arch/posix/time.c/
#include <time.h>
int
_gettimeofday(struct timeval *restrict, void *tzp);
time_t
time(time_t *t)
{
struct timeval tv;
if (_gettimeofday(&tv, NULL) == -1)
return -1;
if (t)
*t =tv.tv_sec;
return tv.tv_sec;
}