Nbody6
 All Files Functions Variables
cputim.f
Go to the documentation of this file.
1  SUBROUTINE cputim(TCOMP)
2 *
3 *
4 * CPU time.
5 * ---------
6 *
7  REAL*8 tcomp
8  common/icpu0/ icpu
9  REAL*4 tarray(2)
10 *
11 *
12 * Initialize timer (first call) or obtain elapsed time.
13  IF (icpu.EQ.0) THEN
14 * CALL LIB$INIT_TIMER
15  tcomp = 0.0
16 * TCOMP = ETIME(TARRAY)
17 * TCOMP = MCLOCK()/6000.
18  icpu = 1
19  ELSE
20 * CALL LIB$STAT_TIMER(2,ITIME)
21 * TCOMP = FLOAT(ITIME)/6000.0
22  tcomp = etime(tarray)/60.0
23 * TCOMP = MCLOCK()/6000.
24 * Elapsed CPU time in minutes on VAX, SUN or MIPS & IBM RS/6000.
25  END IF
26 *
27  RETURN
28 *
29  END