projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
report that posix_spawn is supported in unistd.h and sysconf
[musl]
/
src
/
time
/
time.c
diff --git
a/src/time/time.c
b/src/time/time.c
index
3457dad
..
2275485
100644
(file)
--- a/
src/time/time.c
+++ b/
src/time/time.c
@@
-1,12
+1,13
@@
-#define SYSCALL_RETURN_ERRNO
#include <time.h>
#include <sys/time.h>
#include "syscall.h"
#include <time.h>
#include <sys/time.h>
#include "syscall.h"
+int __clock_gettime(clockid_t, struct timespec *);
+
time_t time(time_t *t)
{
time_t time(time_t *t)
{
- struct time
val tv
;
-
syscall2(__NR_gettimeofday, (long)&tv, 0
);
- if (t) *t = t
v
.tv_sec;
- return t
v
.tv_sec;
+ struct time
spec ts
;
+
__clock_gettime(CLOCK_REALTIME, &ts
);
+ if (t) *t = t
s
.tv_sec;
+ return t
s
.tv_sec;
}
}