2005-07-19 15:21:51 +02:00
|
|
|
#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 */
|
2006-03-03 10:44:55 +01:00
|
|
|
m.T_ENDPT = NONE; /* ignore process times */
|
2010-02-09 16:20:09 +01:00
|
|
|
s = _kernel_call(SYS_TIMES, &m);
|
2005-05-31 16:44:49 +02:00
|
|
|
*ticks = m.T_BOOT_TICKS;
|
|
|
|
return(s);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|