8#include "sleipnir/util/setup_profiler.hpp"
9#include "sleipnir/util/solve_profiler.hpp"
14template <
typename Profiler>
15 requires std::same_as<Profiler, SetupProfiler> ||
16 std::same_as<Profiler, SolveProfiler>
37 : m_profiler{std::move(
rhs.m_profiler)}, m_active{
rhs.m_active} {
58 return m_profiler->current_duration();
Definition intrusive_shared_ptr.hpp:27
Starts a profiler in the constructor and stops it in the destructor.
Definition scoped_profiler.hpp:17
ScopedProfiler(ScopedProfiler &&rhs) noexcept
Definition scoped_profiler.hpp:36
void stop()
Definition scoped_profiler.hpp:47
~ScopedProfiler()
Stops a profiler.
Definition scoped_profiler.hpp:27
ScopedProfiler(Profiler &profiler) noexcept
Definition scoped_profiler.hpp:22
const std::chrono::duration< double > & current_duration() const
Definition scoped_profiler.hpp:57