Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
This class works as a stopwatch. More...
#include <cxxtimer.hpp>
Public Member Functions | |
Timer (bool start=false) | |
Constructor. More... | |
Timer (const Timer &other)=default | |
Copy constructor. More... | |
Timer (Timer &&other)=default | |
Transfer constructor. More... | |
virtual | ~Timer ()=default |
Destructor. More... | |
Timer & | operator= (const Timer &other)=default |
Assignment operator by copy. More... | |
Timer & | operator= (Timer &&other)=default |
Assignment operator by transfer. More... | |
void | start () |
Start/resume the timer. More... | |
void | stop () |
Stop/pause the timer. More... | |
void | reset () |
Reset the timer. More... | |
template<class duration_t = std::chrono::milliseconds> | |
duration_t::rep | count () const |
Return the elapsed time. More... | |
Private Attributes | |
bool | started_ |
bool | paused_ |
std::chrono::steady_clock::time_point | reference_ |
std::chrono::duration< long double > | accumulated_ |
Detailed Description
This class works as a stopwatch.
Definition at line 38 of file cxxtimer.hpp.
Constructor & Destructor Documentation
◆ Timer() [1/3]
|
inline |
Constructor.
- Parameters
-
start If true, the timer is started just after construction. Otherwise, it will not be automatically started.
Definition at line 131 of file cxxtimer.hpp.
References start().
◆ Timer() [2/3]
|
default |
Copy constructor.
- Parameters
-
other The object to be copied.
◆ Timer() [3/3]
|
default |
Transfer constructor.
- Parameters
-
other The object to be transfered.
◆ ~Timer()
|
virtualdefault |
Destructor.
Member Function Documentation
◆ count()
duration_t::rep cxxtimer::Timer::count | ( | ) | const |
Return the elapsed time.
- Parameters
-
duration_t The duration type used to return the time elapsed. If not specified, it returns the time as represented by std::chrono::milliseconds.
- Returns
- The elapsed time.
Definition at line 170 of file cxxtimer.hpp.
References count.
Referenced by llmq::CQuorumManager::BuildQuorumContributions(), llmq::CDKGSession::Contribute(), llmq::CDKGSession::FinalizeCommitments(), llmq::CInstantSendManager::ProcessPendingInstantSendLocks(), llmq::CSigningManager::ProcessPendingRecoveredSigs(), llmq::CSigSharesManager::ProcessPendingSigShares(), llmq::CSigSharesManager::ProcessPendingSigSharesFromNode(), llmq::CDKGSession::ReceiveMessage(), llmq::CDKGSession::SendCommitment(), llmq::CDKGSession::SendContributions(), llmq::CSigSharesManager::Sign(), llmq::CQuorum::StartCachePopulatorThread(), llmq::CSigSharesManager::TryRecoverSig(), llmq::CDKGSession::VerifyAndComplain(), and llmq::CDKGSession::VerifyPendingContributions().
◆ operator=() [1/2]
Assignment operator by copy.
- Parameters
-
other The object to be copied.
- Returns
- A reference to this object.
◆ operator=() [2/2]
Assignment operator by transfer.
- Parameters
-
other The object to be transferred.
- Returns
- A reference to this object.
◆ reset()
|
inline |
Reset the timer.
Definition at line 160 of file cxxtimer.hpp.
◆ start()
|
inline |
◆ stop()
|
inline |
Stop/pause the timer.
Definition at line 152 of file cxxtimer.hpp.
Referenced by llmq::CQuorumManager::BuildQuorumContributions(), llmq::CDKGSession::FinalizeCommitments(), llmq::CInstantSendManager::ProcessPendingInstantSendLocks(), llmq::CSigningManager::ProcessPendingRecoveredSigs(), llmq::CSigSharesManager::ProcessPendingSigShares(), llmq::CSigSharesManager::ProcessPendingSigSharesFromNode(), llmq::CDKGSession::ReceiveMessage(), and llmq::CDKGSession::SendCommitment().
Member Data Documentation
◆ accumulated_
|
private |
Definition at line 125 of file cxxtimer.hpp.
◆ paused_
|
private |
Definition at line 123 of file cxxtimer.hpp.
◆ reference_
|
private |
Definition at line 124 of file cxxtimer.hpp.
◆ started_
|
private |
Definition at line 122 of file cxxtimer.hpp.
The documentation for this class was generated from the following file:
- src/cxxtimer.hpp