kernel, libc: signals fixes
[minix.git] / lib / liblwip / sys_arch.c
blob2a1e7e53d0804f21033e733d1971d004d6be141d
1 #include <sys/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);