source: trunk/minix/lib/syslib/sys_times.c@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

  • Property svn:executable set to *
File size: 428 bytes
Line 
1#include "syslib.h"
2
3PUBLIC int sys_times(proc, ptr)
4int proc; /* proc whose times are needed */
5clock_t ptr[5]; /* pointer to time buffer */
6{
7/* Fetch the accounting info for a proc. */
8 message m;
9 int r;
10
11 m.T_ENDPT = proc;
12 r = _taskcall(SYSTASK, SYS_TIMES, &m);
13 ptr[0] = m.T_USER_TIME;
14 ptr[1] = m.T_SYSTEM_TIME;
15 ptr[2] = m.T_CHILD_UTIME;
16 ptr[3] = m.T_CHILD_STIME;
17 ptr[4] = m.T_BOOT_TICKS;
18 return(r);
19}
Note: See TracBrowser for help on using the repository browser.