ref: 9910099b383e28a0a8b9b8c26ea99a5a2d77f5b3
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;
}