|
ARTEMIS
|
#include <Timer.H>
Public Member Functions | |
| Timer () | |
| The constructor. More... | |
| void | record_start_time () noexcept |
| This function records the start time. More... | |
| void | record_stop_time () noexcept |
| This function records the stop time. More... | |
| amrex::Real | get_duration () noexcept |
| This function returns the duration, calculated as the difference between the stop time and the start time (in seconds). More... | |
| amrex::Real | get_global_duration () |
| This collective function returns the maximum duration recorded across all the MPI ranks (in seconds). More... | |
Private Attributes | |
| amrex::Real | m_start_time |
| amrex::Real | m_stop_time |
This class implements a simple timer. It allows recording a start time and a stop time, and it provides methods to get the total duration, either local or global (i.e., the maximum duration recorder across all the MPI ranks).
| Timer::Timer | ( | ) |
The constructor.
|
noexcept |
This function returns the duration, calculated as the difference between the stop time and the start time (in seconds).
| amrex::Real Timer::get_global_duration | ( | ) |
This collective function returns the maximum duration recorded across all the MPI ranks (in seconds).
|
noexcept |
This function records the start time.
|
noexcept |
This function records the stop time.
|
private |
The start time
|
private |
The stop time