47
48
49
50
51
52
53
54 INTEGER I
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77 INTEGER NTIMER
78 parameter( ntimer = 64 )
79 DOUBLE PRECISION STARTFLAG
80 parameter( startflag = -5.0d+0 )
81
82
83 DOUBLE PRECISION DCPUTIME00, DWALLTIME00
84 EXTERNAL dcputime00, dwalltime00
85
86
87 LOGICAL DISABLED
88 DOUBLE PRECISION CPUSEC( NTIMER ), CPUSTART( NTIMER ),
89 $ WALLSEC( NTIMER ), WALLSTART( NTIMER )
90 COMMON /sltimer00/ cpusec, wallsec, cpustart, wallstart, disabled
91
92
93
94
95
96 IF( disabled )
97 $ RETURN
98
99 IF( wallstart( i ).EQ.startflag ) THEN
100
101
102
103 wallstart( i ) = dwalltime00()
104 cpustart( i ) = dcputime00()
105
106 ELSE
107
108
109
110 cpusec( i ) = cpusec( i ) + dcputime00() - cpustart( i )
111 wallsec( i ) = wallsec( i ) + dwalltime00() - wallstart( i )
112 wallstart( i ) = startflag
113
114 END IF
115
116 RETURN
117
118
119