ref: 08a32f26c08c322c5549b94c05032d2e87f1df3c
dir: /src/libc/arch/posix/time.c/
#include <time.h>
#include "time.h"
extern int _gettimeofday(struct timeval *restrict, void *);
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;
}