#include <sol3/core/async_periodic.h>
|
| virtual | ~IAsyncPeriodic ()=default |
| |
| virtual void | start (std::function< void(std::chrono::steady_clock::time_point expiry)> handler)=0 |
| | Starts the periodic timer with the specified handler. More...
|
| |
| virtual void | cancel ()=0 |
| | Cancels the periodic timer. More...
|
| |
| virtual void | setPeriod (std::chrono::steady_clock::duration period)=0 |
| | Sets a new period for the timer. More...
|
| |
| virtual void | setPhase (std::chrono::steady_clock::duration phase)=0 |
| | Sets the phase for the timer. More...
|
| |
| virtual std::chrono::steady_clock::duration | period () const =0 |
| | Gets the current period. More...
|
| |
| virtual std::chrono::steady_clock::duration | phase () const =0 |
| | Gets the phase time of the timer. More...
|
| |
| virtual std::chrono::steady_clock::time_point | expiry () const =0 |
| | Gets the expiry time of the timer. More...
|
| |
◆ ~IAsyncPeriodic()
| virtual sol3::core::IAsyncPeriodic::~IAsyncPeriodic |
( |
| ) |
|
|
virtualdefault |
◆ cancel()
| virtual void sol3::core::IAsyncPeriodic::cancel |
( |
| ) |
|
|
pure virtual |
Cancels the periodic timer.
◆ expiry()
| virtual std::chrono::steady_clock::time_point sol3::core::IAsyncPeriodic::expiry |
( |
| ) |
const |
|
pure virtual |
Gets the expiry time of the timer.
- Returns
- The time point when the timer will next expire
◆ period()
| virtual std::chrono::steady_clock::duration sol3::core::IAsyncPeriodic::period |
( |
| ) |
const |
|
pure virtual |
Gets the current period.
- Returns
- The current period between handler invocations
◆ phase()
| virtual std::chrono::steady_clock::duration sol3::core::IAsyncPeriodic::phase |
( |
| ) |
const |
|
pure virtual |
Gets the phase time of the timer.
- Returns
- The phase offset of the time
◆ setPeriod()
| virtual void sol3::core::IAsyncPeriodic::setPeriod |
( |
std::chrono::steady_clock::duration |
period | ) |
|
|
pure virtual |
Sets a new period for the timer.
- Parameters
-
| period | The new period between handler invocations |
◆ setPhase()
| virtual void sol3::core::IAsyncPeriodic::setPhase |
( |
std::chrono::steady_clock::duration |
phase | ) |
|
|
pure virtual |
Sets the phase for the timer.
- Parameters
-
| phase | The duration in the range [0, period) |
◆ start()
| virtual void sol3::core::IAsyncPeriodic::start |
( |
std::function< void(std::chrono::steady_clock::time_point expiry)> |
handler | ) |
|
|
pure virtual |
Starts the periodic timer with the specified handler.
- Parameters
-
| handler | The function to call periodically |
The documentation for this class was generated from the following file: