minix/lib/libsys/getuptime.c

23 lines
526 B
C
Raw Normal View History

#include "sysutil.h"
2005-05-31 16:44:49 +02:00
/*===========================================================================*
* getuptime *
*===========================================================================*/
2012-03-25 20:25:53 +02:00
int getuptime(ticks)
2005-05-31 16:44:49 +02:00
clock_t *ticks; /* uptime in ticks */
{
message m;
int s;
m.m_type = SYS_TIMES; /* request time information */
m.T_ENDPT = NONE; /* ignore process times */
s = _kernel_call(SYS_TIMES, &m);
2005-05-31 16:44:49 +02:00
*ticks = m.T_BOOT_TICKS;
return(s);
}