Added getuptime2.c

This commit is contained in:
Philip Homburg 2007-08-07 12:14:04 +00:00
parent 5aa84fb0e6
commit 2519a7cb61
2 changed files with 25 additions and 0 deletions

View file

@ -10,6 +10,7 @@ libsysutil_FILES=" \
kputc.c \
tickdelay.c \
getuptime.c \
getuptime2.c \
env_get_prm.c \
env_parse.c \
env_panic.c \

24
lib/sysutil/getuptime2.c Normal file
View file

@ -0,0 +1,24 @@
#include "sysutil.h"
/*===========================================================================*
* getuptime2 *
*===========================================================================*/
PUBLIC int getuptime2(ticks, boottime)
clock_t *ticks; /* uptime in ticks */
time_t *boottime;
{
message m;
int s;
m.m_type = SYS_TIMES; /* request time information */
m.T_ENDPT = NONE; /* ignore process times */
s = _taskcall(SYSTASK, SYS_TIMES, &m);
*ticks = m.T_BOOT_TICKS;
*boottime = m.T_BOOTTIME;
return(s);
}