Loading...
Searching...
No Matches
Timer

Definition

Returns the actual time in milliseconds.

Examples

The following example uses the clock subroutine to get the actual time in milliseconds.

use benchmark_timer
real(r8) :: time
call clock(time)
write(*,*) 'The actual time is ', time, ' ms.'

Remarks

The system clock that is used can be modified. Three options are available at the moment: CPUTIME, DATETIME, SYSTEMTIME. They corresponds to the underlying functions cpu_time, date_and_time and system_clock, respectively.

Enumerations

enum  { cputime = 0 , datetime = 1 , systemtime = 2 }
 Clock enum. More...

Variables

◆ clock_enum

integer, parameter, public clock_enum = kind(CPUTIME)

clock enum

Definition at line 32 of file Timer.f90.

Methods

◆ clock()

subroutine, public clock ( real(r8), intent(inout) r,
integer(clock_enum), intent(in), optional option )

Returns the actual time in milliseconds.

Parameters
[in,out]rThe parameter containing the clock time in milliseconds
[in]option(optional) Clock type.

Remarks

Possible values are

  • CPUTIME
  • DATETIME
  • SYSTEMTIME

Definition at line 49 of file Timer.f90.