chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[PATCH] another patch for path problem
[elogind.git]
/
klibc
/
klibc
/
time.c
1
/*
2
* time.c
3
*/
4
5
#include <time.h>
6
#include <sys/time.h>
7
#include <sys/syscall.h>
8
9
#ifdef __NR_time
10
11
_syscall1(time_t,time,time_t *,t);
12
13
#else
14
15
time_t time(time_t *t)
16
{
17
struct timeval tv;
18
19
gettimeofday(&tv, NULL);
20
21
if ( t )
22
*t = (time_t)tv.tv_sec;
23
24
return (time_t)tv.tv_sec;
25
}
26
27
#endif