minix/lib/syslib/sys_getuptm.c

15 lines
259 B
C
Raw Normal View History

2005-04-21 16:53:53 +02:00
#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);
}