repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Remove building with NOCRYPTO option
[minix.git]
/
external
/
bsd
/
blacklist
/
port
/
clock_gettime.c
blob
284bd81769018feac543d089e6794c52e50d35be
1
#ifdef HAVE_CONFIG_H
2
#include
"config.h"
3
#endif
4
5
#include <time.h>
6
#include <sys/time.h>
7
8
int
9
clock_gettime
(
int
clock __unused
,
struct
timespec
*
ts
)
10
{
11
struct
timeval tv
;
12
if
(
gettimeofday
(&
tv
,
NULL
) == -
1
)
13
return
-
1
;
14
ts
->
tv_sec
=
tv
.
tv_sec
;
15
ts
->
tv_nsec
=
tv
.
tv_usec
*
1000
;
16
return
0
;
17
}