TotalTime gets the time in seconds (with a precision of microseconds) since the beginning of the program or since the last time ResetTotalTime is executed.
You can use mold input argument to indicate the precision of the output number. Default precision is the default precision of your compiler.
t = TotalTime(mold)
Where:
mold
: Real value to identify the kind of the output. Optional.
It is only used to set the kind of the return value, so it can be any value.Total time spent in seconds since the begining of the program or since the last time ResetTotalTime has been used. Uses precision set by mold.
The following program prints the total time since the start of the program. A more detailed example can be found at here.
PROGRAM totalTimeExample
USE FU_Timing, ONLY: TotalTime
USE FU_Prec, ONLY:dp
IMPLICIT NONE
WRITE(*,*) TotalTime()
WRITE(*,*) TotalTime(1._dp)
END PROGRAM totalTimeExample
Total time spent in seconds since the begining of the program or since the last time ResetTotalTime has been used. Uses default precision of the compiler used.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(in) | :: | mold |
Real value to identify the kind of the output. It is only used to set the kind of the return value, so it can be any value. |
Total time spent in seconds since the begining of the program or since the last time ResetTotalTime has been used. Uses precision set by mold.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | mold |
Real value to identify the kind of the output. It is only used to set the kind of the return value, so it can be any value. |
Total time spent in seconds since the begining of the program or since the last time ResetTotalTime has been used. Uses precision set by mold.