repo.or.cz
/
neatlibc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
stdlib.h: add labs()
[neatlibc.git]
/
time.c
blob
3478196c894c53ecaf6eb3d7d238e3d377293ec5
1
#include <stdlib.h>
2
#include <time.h>
3
#include <sys/time.h>
4
5
long
time
(
long
*
t
)
6
{
7
struct
timeval tv
;
8
gettimeofday
(&
tv
,
NULL
);
9
if
(
t
)
10
*
t
=
tv
.
tv_sec
;
11
return
tv
.
tv_sec
;
12
}