SAT Solver Template
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sat::ScopeWatch Class Reference

Stop watch that automatically adds a timing event to a profiler at destruction. More...

#include <Profiler.hpp>

Inheritance diagram for sat::ScopeWatch:
Inheritance graph
[legend]
Collaboration diagram for sat::ScopeWatch:
Collaboration graph
[legend]

Public Member Functions

 ScopeWatch (Profiler &profiler, std::string eventName)
 
 ~ScopeWatch ()
 

Protected Member Functions

void start ()
 
TimingEvent getTiming () const
 
template<typename T >
auto elapsed () const
 

Protected Attributes

detail::TP startTp
 

Detailed Description

Stop watch that automatically adds a timing event to a profiler at destruction.

Constructor & Destructor Documentation

◆ ScopeWatch()

sat::ScopeWatch::ScopeWatch ( Profiler profiler,
std::string  eventName 
)

CTor. Starts the stop watch

Parameters
profilerprofiler where the event is registered
eventNamename of the event

◆ ~ScopeWatch()

sat::ScopeWatch::~ScopeWatch ( )

DTor. Stops the stop watch and adds the event to the scheduler

Member Function Documentation

◆ elapsed()

template<typename T >
auto sat::StopWatch::elapsed ( ) const
inlineinherited

Get the number of elapsed time units

Template Parameters
Ttime unit
Returns
number of time units since call to start

◆ getTiming()

TimingEvent sat::StopWatch::getTiming ( ) const
inherited

Get the timing event since the last call to start and the time of the call

Returns
TimingEvent with start point set to the last call to start() and end event the current time

◆ start()

void sat::StopWatch::start ( )
inherited

Resets the start event to the current time


The documentation for this class was generated from the following files: