14 #ifndef ZYPP_NG_BASE_TIMER_H_INCLUDED 15 #define ZYPP_NG_BASE_TIMER_H_INCLUDED 18 #include <zypp-core/zyppng/base/Base> 19 #include <zypp-core/zyppng/base/Signals> 25 class EventDispatcher;
74 static uint64_t
now ();
128 void start ( uint64_t timeout );
uint64_t interval() const
std::weak_ptr< Base > WeakPtr
SignalProxy< void(Timer &t)> sigExpired()
This signal is always emitted when the timer expires.
ZYPP_FWD_DECL_TYPE_WITH_REFS(Context)
void stop()
Stops the timer if it is running. The.
void setSingleShot(bool singleShot=true)
Sets the timer to trigger only once, after it has expired once.
The Timer class provides repetitive and single-shot timers.
uint64_t remaining() const
static std::shared_ptr< Timer > create()
Creates a new Timer object, the timer is not started at this point.
uint64_t expire()
Advances the internal clock of the timer, if the timer expires the sigExpired signal is emitted...
#define ZYPP_DECLARE_PRIVATE(Class)
std::shared_ptr< Base > Ptr
static uint64_t elapsedSince(const uint64_t start)