]> Zhao Yanbai Git Server - minix.git/commitdiff
*** empty log message ***
authorJorrit Herder <jnherder@minix3.org>
Tue, 31 May 2005 14:44:49 +0000 (14:44 +0000)
committerJorrit Herder <jnherder@minix3.org>
Tue, 31 May 2005 14:44:49 +0000 (14:44 +0000)
lib/utils/get_upt.c [new file with mode: 0644]

diff --git a/lib/utils/get_upt.c b/lib/utils/get_upt.c
new file mode 100644 (file)
index 0000000..06f9417
--- /dev/null
@@ -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);
+}
+
+
+
+
+