mirror of https://git.musl-libc.org/git/musl
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
244 B
13 lines
244 B
#include <time.h>
|
|
#include <sys/time.h>
|
|
#include "syscall.h"
|
|
|
|
int __clock_gettime(clockid_t, struct timespec *);
|
|
|
|
time_t time(time_t *t)
|
|
{
|
|
struct timespec ts;
|
|
__clock_gettime(CLOCK_REALTIME, &ts);
|
|
if (t) *t = ts.tv_sec;
|
|
return ts.tv_sec;
|
|
}
|
|
|