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