source: trunk/minix/lib/posix/_times.c@ 10

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

Minix 3.1.2a

File size: 388 bytes
Line 
1#include <lib.h>
2#define times _times
3#include <sys/times.h>
4#include <time.h>
5
6PUBLIC clock_t times(buf)
7struct tms *buf;
8{
9 message m;
10
11 m.m4_l5 = 0; /* return this if system is pre-1.6 */
12 if (_syscall(MM, TIMES, &m) < 0) return( (clock_t) -1);
13 buf->tms_utime = m.m4_l1;
14 buf->tms_stime = m.m4_l2;
15 buf->tms_cutime = m.m4_l3;
16 buf->tms_cstime = m.m4_l4;
17 return(m.m4_l5);
18}
Note: See TracBrowser for help on using the repository browser.