From f0af8d85e7776f0fe047c2ed882f13d07eadf662 Mon Sep 17 00:00:00 2001 From: Jorrit Herder Date: Tue, 31 May 2005 14:44:49 +0000 Subject: [PATCH] *** empty log message *** --- lib/utils/get_upt.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lib/utils/get_upt.c diff --git a/lib/utils/get_upt.c b/lib/utils/get_upt.c new file mode 100644 index 000000000..06f94179a --- /dev/null +++ b/lib/utils/get_upt.c @@ -0,0 +1,22 @@ +#include "utils.h" + +/*===========================================================================* + * getuptime * + *===========================================================================*/ +PUBLIC int getuptime(ticks) +clock_t *ticks; /* uptime in ticks */ +{ + message m; + int s; + + m.m_type = SYS_TIMES; /* request time information */ + m.T_PROC_NR = NONE; /* ignore process times */ + s = _taskcall(SYSTASK, SYS_TIMES, &m); + *ticks = m.T_BOOT_TICKS; + return(s); +} + + + + + -- 2.44.0