Skip to content

An object-oriented approach for timing program execution in modern Fortran (2008+).

Notifications You must be signed in to change notification settings

szaghi/CPU_timer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CPU_timer

An object-oriented approach for timing program execution in modern Fortran (2008+).

Usage:

use, intrinsic :: iso_fortran_env, only: &
    WP     => REAL64, &
    IP     => INT32

use type_cpu_timer_mod, only: &
    cpu_timer_t

! Explicit typing only
implicit none

type (cpu_timer_t) :: timer
real (WP)          :: t
integer (IP)       :: units

!*Starting the timer

call timer%Start()

!* Stopping the timer

call timer%Stop()

!* Reading the time

t = timer%Get_elapsed_time( units ) ! Wall clock time
t = timer%Get_total_time( units )   ! Total processor time

!* units (optional) = 0 for seconds, or 1 for minutes, or 2 for hours

!* Get time stamp

call timer%Get_time_stamp()

About

An object-oriented approach for timing program execution in modern Fortran (2008+).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • Fortran 94.9%
  • Makefile 2.4%
  • Assembly 1.4%
  • PHP 1.3%