retire 64-bit conversion functions
[minix3.git] / lib / libsys / getuptime.c
blob1d7743842d655d9eb8f6fdbb10072e021977c742
1 #include "sysutil.h"
3 /*===========================================================================*
4 * getuptime *
5 *===========================================================================*/
6 int getuptime(ticks, realtime, boottime)
7 clock_t *ticks; /* monotonic time in ticks */
8 clock_t *realtime; /* wall time in ticks */
9 time_t *boottime;
11 message m;
12 int s;
14 m.m_type = SYS_TIMES; /* request time information */
15 m.T_ENDPT = NONE; /* ignore process times */
16 s = _kernel_call(SYS_TIMES, &m);
17 *ticks = m.T_BOOT_TICKS;
18 *realtime = m.T_REAL_TICKS;
19 *boottime = m.T_BOOTTIME;
20 return(s);