2 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
6 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
7 /* All Rights Reserved */
10 * Copyright (c) 1980 Regents of the University of California.
11 * All rights reserved. The Berkeley software License Agreement
12 * specifies the terms and conditions for redistribution.
15 #pragma ident "%Z%%M% %I% %E% SMI"
19 #include <sys/types.h>
23 long proc_system_time
;
25 long child_system_time
;
27 static long start
, user
, systm
;
36 user
= tx
.proc_user_time
;
37 systm
= tx
.proc_system_time
;
51 lap
= (tp
- start
)/60.;
52 use
= (tx
.proc_user_time
- user
)/60.;
53 sys
= (tx
.proc_system_time
- systm
)/60.;
54 printf("Elapsed %.2f CPU %.2f (user %.2f, sys %.2f)\n",
55 lap
, use
+sys
, use
, sys
);