WarpX
|
#include <Timer.H>
Public Member Functions | |
Timer ()=default | |
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... | |
double | get_duration () const noexcept |
This function returns the duration, calculated as the difference between the stop time and the start time (in seconds). More... | |
double | get_global_duration () const |
This collective function returns the maximum duration recorded across all the MPI ranks (in seconds). More... | |
Private Attributes | |
double | m_start_time |
double | 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).
|
default |
The constructor.
|
noexcept |
This function returns the duration, calculated as the difference between the stop time and the start time (in seconds).
double Timer::get_global_duration | ( | ) | const |
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