module CTimerLegacy implicit none public type, public :: TimerLegacy integer, dimension(8) :: StartTime integer, dimension(8) :: EndTime contains procedure :: Start => Start procedure :: Finish => Finish procedure :: ElapsedTimeMs => ElapsedTime end type TimerLegacy contains subroutine Start(this) implicit none class(TimerLegacy), intent(inout) :: this call date_and_time(values=this%StartTime) end subroutine subroutine Finish(this) implicit none class(TimerLegacy), intent(inout) :: this call date_and_time(values=this%EndTime) end subroutine integer function ElapsedTime(this) implicit none class(TimerLegacy), intent(inout) :: this ElapsedTime = (this%EndTime(6)*60000+this%EndTime(7)*1000+this%EndTime(8)) - (this%StartTime(6)*60000+this%StartTime(7)*1000+this%StartTime(8)) end function end module CTimerLegacy