projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
some preliminaries for vdso clock support
[oweals/musl.git]
/
src
/
time
/
time.c
1
#include <time.h>
2
#include <sys/time.h>
3
#include "syscall.h"
4
5
int __clock_gettime(clockid_t, struct timespec *);
6
7
time_t time(time_t *t)
8
{
9
struct timespec ts;
10
__clock_gettime(CLOCK_REALTIME, &ts);
11
if (t) *t = ts.tv_sec;
12
return ts.tv_sec;
13
}