Kagome
Polkadot Runtime Engine in C++17
kagome::clock::Timer Struct Referenceabstract

#include <timer.hpp>

Inheritance diagram for kagome::clock::Timer:
Collaboration diagram for kagome::clock::Timer:

Public Member Functions

virtual ~Timer ()=default
 
virtual void expiresAt (clock::SystemClock::TimePoint at)=0
 
virtual void expiresAfter (clock::SystemClock::Duration duration)=0
 
virtual void cancel ()=0
 
virtual void asyncWait (const std::function< void(const std::error_code &)> &h)=0
 

Detailed Description

Interface for asynchronous timer

Definition at line 18 of file timer.hpp.

Constructor & Destructor Documentation

virtual kagome::clock::Timer::~Timer ( )
virtualdefault

Member Function Documentation

virtual void kagome::clock::Timer::asyncWait ( const std::function< void(const std::error_code &)> &  h)
pure virtual

Wait for the timer expiration

Parameters
h- handler, which is called, when the timer is expired, or error happens

Implemented in kagome::clock::BasicWaitableTimer.

virtual void kagome::clock::Timer::cancel ( )
pure virtual

Cancel timer

Implemented in kagome::clock::BasicWaitableTimer.

virtual void kagome::clock::Timer::expiresAfter ( clock::SystemClock::Duration  duration)
pure virtual

Set an expire time for this timer

Parameters
durationbefore timer will be expired

Implemented in kagome::clock::BasicWaitableTimer.

virtual void kagome::clock::Timer::expiresAt ( clock::SystemClock::TimePoint  at)
pure virtual

Set an expire time for this timer

Parameters
at- timepoint, at which the timer expires

Implemented in kagome::clock::BasicWaitableTimer.


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