. service tells you which device it couldn't stat
[minix3.git] / lib / ack / libp / clock.c
blobf5847696a9fee3277dee33e24758bc02b50bee79
1 /* $Header$ */
2 /*
3 * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
5 * This product is part of the Amsterdam Compiler Kit.
7 * Permission to use, sell, duplicate or disclose this software must be
8 * obtained in writing. Requests for such permissions may be sent to
10 * Dr. Andrew S. Tanenbaum
11 * Wiskundig Seminarium
12 * Vrije Universiteit
13 * Postbox 7161
14 * 1007 MC Amsterdam
15 * The Netherlands
19 /* Author: J.W. Stevenson */
21 /* function clock:integer; extern; */
23 extern int _times();
25 struct tbuf {
26 long utime;
27 long stime;
28 long cutime;
29 long cstime;
32 #ifndef EM_WSIZE
33 #define EM_WSIZE _EM_WSIZE
34 #endif
36 int clock() {
37 struct tbuf t;
39 _times(&t);
40 return( (int)(t.utime + t.stime) &
41 #if EM_WSIZE <= 2
42 077777
43 #else
44 0x7fffffffL
45 #endif