EBGeometry  1.0
EBGeometry_SimpleTimer.hpp
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2024 Robert Marskar
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef EBGeometry_SimpleTimer
13 #define EBGeometry_SimpleTimer
14 
15 // Std includes
16 #include <chrono>
17 
18 namespace EBGeometry {
19 
24  {
25  public:
29  using Clock = std::chrono::steady_clock;
30 
34  using TimePoint = Clock::time_point;
35 
39  inline SimpleTimer() noexcept;
40 
44  inline ~SimpleTimer() noexcept = default;
45 
49  inline void
50  start() noexcept;
51 
55  inline void
56  stop() noexcept;
57 
61  inline double
62  seconds() const noexcept;
63 
64  protected:
69 
74  };
75 
76 } // namespace EBGeometry
77 
78 #include "EBGeometry_SimpleTimerImplem.hpp"
79 
80 #endif
Simple timer class used for local performance profiling. Does not include MPI capabilities and is the...
Definition: EBGeometry_SimpleTimer.hpp:24
TimePoint m_start
Start point.
Definition: EBGeometry_SimpleTimer.hpp:68
void start() noexcept
Start timing.
TimePoint m_stop
Stop point.
Definition: EBGeometry_SimpleTimer.hpp:73
Clock::time_point TimePoint
Time point alias.
Definition: EBGeometry_SimpleTimer.hpp:34
double seconds() const noexcept
Report result – prints result in seconds.
std::chrono::steady_clock Clock
Clock alias.
Definition: EBGeometry_SimpleTimer.hpp:29
void stop() noexcept
Stop timing.
SimpleTimer() noexcept
Constructor.
Name space for all of EBGeometry.
Definition: EBGeometry.hpp:21