worldstone: add -s for statistical profiling
[minix.git] / lib / liblwip / sys_arch.c
blobeeedb4baad34faa390bcea62d3fe33c75b8e3721
1 #include <minix/types.h>
2 #include <minix/sysutil.h>
3 #include <errno.h>
5 u32_t sys_jiffies(void)
7 clock_t ticks;
9 if (getuptime(&ticks) == OK)
10 return ticks;
11 else
12 panic("getuptime() failed\n");
15 u32_t sys_now(void)
17 static u32_t hz;
18 u32_t jiffs;
20 if (!hz)
21 hz = sys_hz();
23 jiffs = sys_jiffies();
25 return jiffs * (1000 / hz);