minix/lib/syslib/sys_getuptm.c
2005-04-21 14:53:53 +00:00

14 lines
259 B
C

#include "syslib.h"
PUBLIC int sys_getuptime(ticks)
clock_t *ticks; /* pointer to store ticks */
{
/* Fetch the system time. */
message m;
int r;
m.T_PROC_NR = NONE;
r = _taskcall(SYSTASK, SYS_TIMES, &m);
*ticks = m.T_BOOT_TICKS;
return(r);
}