Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | Time |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
FUNCTION CreateTimeString( Time ) RESULT(OutputString)
! FUNCTION INFORMATION:
! AUTHOR Dimitri Curtil
! DATE WRITTEN January 2005
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function creates the time stamp string from the time value specified in seconds.
! Inspired by similar function CreateSysTimeIntervalString() in General.f90
! However, this function provides better accuracy for sub-minute time steps
! by also showing information down to the 10th of a second.
!
! Note that Time is expected to be specified in REAL(r64).
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: Time ! Time in seconds
CHARACTER(len=10) :: OutputString ! Contains time stamp
! FUNCTION PARAMETER DEFINITIONS:
CHARACTER(len=*), PARAMETER :: TStampFmt="(I2.2,':',I2.2,':',F4.1)"
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
CHARACTER(len=10) TimeStamp ! Character representation of time using hh:mm:ss.ssss format
INTEGER Hours ! Number of hours <= 24
INTEGER Minutes ! Remaining minutes < 60
REAL(r64) Seconds ! Remaining seconds < 60
CALL ParseTime( Time, Hours, Minutes, Seconds )
TimeStamp(:) = ' '
! TimeStamp written with formatting
! "hh:mm:ss.s"
! "1234567890"
WRITE(TimeStamp,TStampFmt) Hours, Minutes, Seconds
IF (TimeStamp(4:4) == ' ') TimeStamp(4:4)='0'
IF (TimeStamp(7:7) == ' ') TimeStamp(7:7)='0'
IF (TimeStamp(10:10) == ' ') TimeStamp(10:10)='0'
TimeStamp = ADJUSTL(TimeStamp)
OutputString = TimeStamp
! For debugging only
!WRITE(*,'(A)') ' UtilityRoutines::CreateTimeString()'
!WRITE(*,'(A,F15.10)') ' Time = ', Time
!WRITE(*,*) ' Hours = ', Hours
!WRITE(*,*) ' Minutes = ', Minutes
!WRITE(*,*) ' Seconds = ', Seconds
!WRITE(*,*) ' TimeStamp = ', TimeStamp
!WRITE(*,*) ' OutputString = ', OutputString
RETURN
END FUNCTION CreateTimeString