date and time created 80/10/30 00:36:03 by mckusick
[unix-history] / usr / src / usr.bin / pascal / libpc / PCEXIT.c
CommitLineData
6a5793e1
KM
1/* Copyright (c) 1979 Regents of the University of California */
2
3static char sccsid[] = "@(#)PCEXIT.c 1.1 %G%";
4
5#include "h00vars.h"
6
7PCEXIT(code)
8
9 int code;
10{
11 struct {
12 long usr_time;
13 long sys_time;
14 long child_usr_time;
15 long child_sys_time;
16 } tbuf;
17 double l;
18
19 PCLOSE(GLVL);
20 PFLUSH();
21 if (_stcnt > 0) {
22 times(&tbuf);
23 l = tbuf.usr_time;
24 l = l / HZ;
25 fprintf(stderr, "\n%1ld %s %04.2f seconds cpu time.\n",
26 _stcnt, "statements executed in", l);
27 }
28 exit(code);
29}