|
| ~Timer () override |
|
void | setSingleShot (bool singleShot=true) |
| Sets the timer to trigger only once, after it has expired once.
|
|
bool | singleShot () const |
|
uint64_t | started () const |
|
uint64_t | interval () const |
|
uint64_t | remaining () const |
|
uint64_t | elapsed () const |
|
uint64_t | expires () const |
|
uint64_t | expire () |
| Advances the internal clock of the timer, if the timer expires the sigExpired signal is emitted.
|
|
bool | isRunning () const |
|
void | start () |
|
void | start (uint64_t timeout) |
| Starts the timer, if the timer is already running this will restart the currently running timer.
|
|
void | stop () |
| Stops the timer if it is running. The.
|
|
| Base () |
|
virtual | ~Base () |
|
WeakPtr | parent () const |
|
void | addChild (const Base::Ptr &child) |
|
void | removeChild (const Ptr &child) |
|
const std::unordered_set< Ptr > & | children () const |
|
std::thread::id | threadId () const |
|
template<typename T > |
std::vector< std::weak_ptr< T > > | findChildren () const |
|
template<typename T > |
std::shared_ptr< T > | shared_this () const |
|
template<typename T > |
std::shared_ptr< T > | shared_this () |
|
template<typename T > |
std::weak_ptr< T > | weak_this () const |
|
template<typename T > |
std::weak_ptr< T > | weak_this () |
|
template<typename SenderFunc , typename ReceiverFunc > |
auto | connect (SenderFunc &&sFun, typename internal::MemberFunction< ReceiverFunc >::ClassType &recv, ReceiverFunc &&rFunc) |
|
template<typename SenderFunc , typename ReceiverFunc , typename ... Tracker> |
std::enable_if_t< std::is_member_function_pointer_v< SenderFunc >, connection > | connectFunc (SenderFunc &&sFun, ReceiverFunc &&rFunc, const Tracker &...trackers) |
|
The Timer class provides repetitive and single-shot timers.
Provides a high level interface for timers. To use it, create a Timer and connect a slot to its
- See also
- sigExpired signal.
t1->sigExpired().connect( sigc::mem_fun(
this, &HandlerClass::timeout) );
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
static std::shared_ptr< Timer > create()
Creates a new Timer object, the timer is not started at this point.
std::shared_ptr< Timer > Ptr
The timeout slot will now be called every second.
- Note
- The accuracy of the timer should be around 1ms , but also depends on the underlying hardware.
Definition at line 44 of file timer.h.