testTime.f90 Source File

This File Depends On

sourcefile~~testtime.f90~~EfferentGraph sourcefile~testtime.f90 testTime.f90 sourcefile~time.f90 time.f90 sourcefile~time.f90->sourcefile~testtime.f90 sourcefile~kinds.f90 kinds.f90 sourcefile~kinds.f90->sourcefile~testtime.f90 sourcefile~kinds.f90->sourcefile~time.f90
Help

Source Code


Source Code

program testTime_prg
	!! Test program for time_mod
	use kinds_mod
	use time_mod
	implicit none
	
	call testCpuTime
	call testWallTime
	
contains

	subroutine testCpuTime
		!! Test cpuTime to verify operation
		real(wp)::t0,t1
		
		t0 = cpuTime()
		call wait(0.1_wp)
		t1 = cpuTime()
		
		if( t1-t0>0.01_wp ) error stop "Failed cpuTime check"
	end subroutine testCpuTime 

	subroutine testWallTime
		!! Test wallTime to verify operation
		real(wp)::t0,t1
		
		t0 = wallTime()
		call wait(0.1_wp)
		t1 = wallTime()
		
		if( t1-t0<0.1_wp ) error stop "Failed wallTime check"
	end subroutine testWallTime 

end program testTime_prg