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
worldstone: add -s for statistical profiling
[minix.git]
/
lib
/
liblwip
/
sys_arch.c
blob
eeedb4baad34faa390bcea62d3fe33c75b8e3721
1
#include <minix/types.h>
2
#include <minix/sysutil.h>
3
#include <errno.h>
4
5
u32_t
sys_jiffies
(
void
)
6
{
7
clock_t
ticks
;
8
9
if
(
getuptime
(&
ticks
) ==
OK
)
10
return
ticks
;
11
else
12
panic
(
"getuptime() failed
\n
"
);
13
}
14
15
u32_t
sys_now
(
void
)
16
{
17
static
u32_t hz
;
18
u32_t jiffs
;
19
20
if
(!
hz
)
21
hz
=
sys_hz
();
22
23
jiffs
=
sys_jiffies
();
24
25
return
jiffs
* (
1000
/
hz
);
26
}
27