1 /*- 2 * Copyright (c) 1979 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)PCEXIT.c 1.2 (Berkeley) 04/09/90"; 10 #endif /* not lint */ 11 12 #include "h00vars.h" 13 14 PCEXIT(code) 15 16 int code; 17 { 18 struct { 19 long usr_time; 20 long sys_time; 21 long child_usr_time; 22 long child_sys_time; 23 } tbuf; 24 double l; 25 26 PCLOSE(GLVL); 27 PFLUSH(); 28 if (_stcnt > 0) { 29 times(&tbuf); 30 l = tbuf.usr_time; 31 l = l / HZ; 32 fprintf(stderr, "\n%1ld %s %04.2f seconds cpu time.\n", 33 _stcnt, "statements executed in", l); 34 } 35 exit(code); 36 } 37