/workspaces/astro/sol3-sdk/cpp/sol3/core/async_periodic.h Source File
|
Space-ng SDK
|
async_periodic.h
Go to the documentation of this file.
Definition: async_periodic.h:33
virtual std::chrono::steady_clock::duration period() const =0
Gets the current period.
virtual std::chrono::steady_clock::duration phase() const =0
Gets the phase time of the timer.
virtual void setPhase(std::chrono::steady_clock::duration phase)=0
Sets the phase for the timer.
virtual void start(std::function< void(std::chrono::steady_clock::time_point expiry)> handler)=0
Starts the periodic timer with the specified handler.
virtual ~IAsyncPeriodic()=default
virtual std::chrono::steady_clock::time_point expiry() const =0
Gets the expiry time of the timer.
virtual void setPeriod(std::chrono::steady_clock::duration period)=0
Sets a new period for the timer.
boost::asio::strand< boost::asio::io_context::executor_type > Strand
Definition: strand.h:8
Definition: any_message_input.h:15
std::shared_ptr< IAsyncPeriodic > createAsyncPeriodic(asio::Strand strand, std::chrono::duration< TRep, TPeriod > period)
Constructs an IAsyncPeriodic timer.
TClockT::time_point periodicExpiry(typename TClockT::time_point now, typename TClockT::duration period, typename TClockT::duration phase={})
Computes the next expiry time point for a periodic timer.
Generated by