Skip to content
Snippets Groups Projects
Commit a64166d9 authored by Christoph Hellwig's avatar Christoph Hellwig
Browse files

import time() from musl

parent 3fc80e18
No related branches found
No related tags found
No related merge requests found
......@@ -596,6 +596,7 @@ libc += time/localtime_r.o
libc += time/mktime.o
libc += time/strftime.o
libc += time/strptime.o
libc += time/time.o
libc += time/timegm.o
libc += time/tzset.o
libc += time/wcsftime.o
......
#include <time.h>
#include <sys/time.h>
time_t time(time_t *t)
{
struct timespec ts;
clock_gettime(CLOCK_REALTIME, &ts);
if (t) *t = ts.tv_sec;
return ts.tv_sec;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment