EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
EBGeometry_SimpleTimer.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2024 Robert Marskar <robert.marskar@sintef.no>
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
11#ifndef EBGEOMETRY_SIMPLETIMER_HPP
12#define EBGEOMETRY_SIMPLETIMER_HPP
13
14// Std includes
15#include <chrono>
16
17namespace EBGeometry {
18
23{
24public:
28 using Clock = std::chrono::steady_clock;
29
33 using TimePoint = Clock::time_point;
34
41
46
51 inline void
53
57 inline void
59
64 [[nodiscard]] inline double
66
72
77};
78
79} // namespace EBGeometry
80
81#include "EBGeometry_SimpleTimerImplem.hpp"
82
83#endif
Simple timer class used for local performance profiling.
Definition EBGeometry_SimpleTimer.hpp:23
TimePoint m_start
Start time point.
Definition EBGeometry_SimpleTimer.hpp:71
void start() noexcept
Start timing.
TimePoint m_stop
Stop time point.
Definition EBGeometry_SimpleTimer.hpp:76
Clock::time_point TimePoint
Time point alias.
Definition EBGeometry_SimpleTimer.hpp:33
double seconds() const noexcept
Compute the elapsed time between the last start() and stop() calls.
std::chrono::steady_clock Clock
Clock alias.
Definition EBGeometry_SimpleTimer.hpp:28
void stop() noexcept
Stop timing.
SimpleTimer() noexcept
Constructor. Immediately calls start() followed by stop() to initialise both time points to the curre...
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:225
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_AnalyticDistanceFunctions.hpp:31