Change the map65 timer.f90 to use system_clock() ==> wall clock time.

This commit is contained in:
Joe Taylor 2021-04-26 14:57:15 -04:00
parent b3d15ea0c6
commit ed59972ee4
1 changed files with 5 additions and 2 deletions

View File

@ -10,6 +10,7 @@ subroutine timer(dname,k)
real ut(50),ut0(50),dut(50),tt(2)
integer ncall(50),nlevel(50),nparent(50)
integer onlevel(0:10)
integer*8 count0,clkfreq
common/tracer/ limtrace,lu
data eps/0.000001/,ntrace/0/
data level/0/,nmax/0/,space/' '/
@ -36,7 +37,8 @@ subroutine timer(dname,k)
if(on(n)) print*,'Error in timer: ',dname,' already on.'
level=level+1 !Increment the level
on(n)=.true.
ut0(n)=etime(tt)
call system_clock(count0,clkfreq)
ut0(n)=float(count0)/float(clkfreq)
ncall(n)=ncall(n)+1
if(ncall(n).gt.1.and.nlevel(n).ne.level) then
nlevel(n)=-1
@ -49,7 +51,8 @@ subroutine timer(dname,k)
else if(k.eq.1) then !Get stop times and accumulate sums. (k=1)
if(on(n)) then
on(n)=.false.
ut1=etime(tt)
call system_clock(count0,clkfreq)
ut1=float(count0)/float(clkfreq)
ut(n)=ut(n)+ut1-ut0(n)
endif
level=level-1