minix/lib/liblwip/sys_arch.c
Lionel Sambuc 456a46e6bf Removing useless minix/types.h header
Change-Id: If5f922279b87f075f301b64c7786caa18b434c2a
2012-12-07 13:58:06 +01:00

27 lines
342 B
C

#include <sys/types.h>
#include <minix/sysutil.h>
#include <errno.h>
u32_t sys_jiffies(void)
{
clock_t ticks;
if (getuptime(&ticks) == OK)
return ticks;
else
panic("getuptime() failed\n");
}
u32_t sys_now(void)
{
static u32_t hz;
u32_t jiffs;
if (!hz)
hz = sys_hz();
jiffs = sys_jiffies();
return jiffs * (1000 / hz);
}