Added lance entry to drivers.conf.
[minix3-old.git] / lib / syslib / sys_times.c
blobcd36f58c18e82acf9a973b57c1690d755285e904
1 #include "syslib.h"
3 PUBLIC int sys_times(proc, user_time, sys_time, uptime)
4 int proc; /* proc whose times are needed */
5 clock_t *user_time; /* time spend in the process itself */
6 clock_t *sys_time; /* time spend in system on behalf of the
7 * process
8 */
9 clock_t *uptime; /* time the system is running */
11 /* Fetch the accounting info for a proc. */
12 message m;
13 int r;
15 m.T_ENDPT = proc;
16 r = _taskcall(SYSTASK, SYS_TIMES, &m);
17 if (user_time) *user_time = m.T_USER_TIME;
18 if (sys_time) *sys_time = m.T_SYSTEM_TIME;
19 if (uptime) *uptime = m.T_BOOT_TICKS;
20 return(r);