From 2519a7cb61d5062e1093515d97e14c99a335cb58 Mon Sep 17 00:00:00 2001 From: Philip Homburg Date: Tue, 7 Aug 2007 12:14:04 +0000 Subject: [PATCH] Added getuptime2.c --- lib/sysutil/Makefile.in | 1 + lib/sysutil/getuptime2.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 lib/sysutil/getuptime2.c diff --git a/lib/sysutil/Makefile.in b/lib/sysutil/Makefile.in index 79a646740..74717497e 100644 --- a/lib/sysutil/Makefile.in +++ b/lib/sysutil/Makefile.in @@ -10,6 +10,7 @@ libsysutil_FILES=" \ kputc.c \ tickdelay.c \ getuptime.c \ + getuptime2.c \ env_get_prm.c \ env_parse.c \ env_panic.c \ diff --git a/lib/sysutil/getuptime2.c b/lib/sysutil/getuptime2.c new file mode 100644 index 000000000..764f7f7f3 --- /dev/null +++ b/lib/sysutil/getuptime2.c @@ -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); +} + + + + + -- 2.44.0