|
HikoGUI
A low latency retained GUI
|
#include <hikogui/dispatch/function_timer.hpp>
Public Types | |
| using | callback_proto = Proto |
| using | function_type = std::function<callback_proto> |
| using | callback_token = std::shared_ptr<function_type> |
| using | weak_callback_token = std::weak_ptr<function_type> |
| using | result_type = function_type::result_type |
Public Member Functions | |
| constexpr bool | empty () const noexcept |
| std::pair< callback_token, bool > | delay_function (utc_nanoseconds time_point, forward_of< callback_proto > auto &&callback) noexcept |
| Add a function to be called at a certain time. | |
| std::pair< callback_token, bool > | repeat_function (std::chrono::nanoseconds period, utc_nanoseconds time_point, forward_of< callback_proto > auto &&callback) noexcept |
| Add a function to be called repeatedly. | |
| std::pair< callback_token, bool > | repeat_function (std::chrono::nanoseconds period, forward_of< callback_proto > auto &&callback) noexcept |
| Add a function to be called repeatedly. | |
| utc_nanoseconds | current_deadline () const noexcept |
| Get the deadline of the next function to call. | |
| void | run_all (utc_nanoseconds current_time, auto const &...args) noexcept |
| Run all the function that should have run by the current_time. | |
A time that calls functions.
| Proto | the prototype of the function passed. |
| Size | the size of the function object. |
|
inlinenoexcept |
Get the deadline of the next function to call.
|
inlinenoexcept |
Add a function to be called at a certain time.
| time_point | The time when to call the function. |
| callback | The function to be called. |
|
inlinenoexcept |
Add a function to be called repeatedly.
| period | The period between repeated calls |
| callback | The function to be called. |
|
inlinenoexcept |
Add a function to be called repeatedly.
| period | The period between repeated calls |
| time_point | The time when to call the function the first time. |
| callback | The function to be called. |
|
inlinenoexcept |
Run all the function that should have run by the current_time.
| current_time | The current time. |
| args | The arguments to pass to the function. |