QMCPACK
RunTimeManager< CLOCK > Class Template Reference
+ Collaboration diagram for RunTimeManager< CLOCK >:

Public Member Functions

double elapsed ()
 
 RunTimeManager ()
 
bool isStopNeeded () const
 
void markStop ()
 

Private Attributes

const CLOCK::time_point start_time
 
bool need_to_stop_
 

Detailed Description

template<class CLOCK = ChronoClock>
class qmcplusplus::RunTimeManager< CLOCK >

Definition at line 26 of file RunTimeManager.h.

Constructor & Destructor Documentation

◆ RunTimeManager()

RunTimeManager ( )
inline

Definition at line 35 of file RunTimeManager.h.

35 : start_time(CLOCK::now()) {}
const CLOCK::time_point start_time

Member Function Documentation

◆ elapsed()

double elapsed ( )
inline

Definition at line 29 of file RunTimeManager.h.

References RunTimeManager< CLOCK >::start_time.

Referenced by qmcplusplus::TEST_CASE().

30  {
31  std::chrono::duration<double> elapsed = CLOCK::now() - start_time;
32  return elapsed.count();
33  }
const CLOCK::time_point start_time

◆ isStopNeeded()

bool isStopNeeded ( ) const
inline

Definition at line 37 of file RunTimeManager.h.

References RunTimeManager< CLOCK >::need_to_stop_.

◆ markStop()

void markStop ( )
inline

Definition at line 38 of file RunTimeManager.h.

References RunTimeManager< CLOCK >::need_to_stop_.

Member Data Documentation

◆ need_to_stop_

bool need_to_stop_
private

◆ start_time

const CLOCK::time_point start_time
private

Definition at line 41 of file RunTimeManager.h.

Referenced by RunTimeManager< CLOCK >::elapsed().


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