make vfs & filesystems use failable copying
[minix3.git] / lib / liblwip / sys_arch.c
blob7d4fc49af1826848c113ba3c2b4fa0849d7189b2
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 (getticks(&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 /* use ticks not realtime as sys_now() is used to calculate timers */
24 jiffs = sys_jiffies();
26 return jiffs * (1000 / hz);