projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
rework langinfo code for ABI compat and for use by time code
[musl]
/
time
/
time.c
1
#define SYSCALL_RETURN_ERRNO
2
#include <time.h>
3
#include <sys/time.h>
4
#include "syscall.h"
5
6
time_t time(time_t *t)
7
{
8
struct timeval tv;
9
syscall2(__NR_gettimeofday, (long)&tv, 0);
10
if (t) *t = tv.tv_sec;
11
return tv.tv_sec;
12
}