29 #ifndef Pt_System_Timer_h
30 #define Pt_System_Timer_h
32 #include <Pt/System/Api.h>
33 #include <Pt/Signal.h>
34 #include <Pt/Timespan.h>
160 {
return _finished; }
165 std::size_t _interval;
175 #endif // Pt_System_Timer_h
Core module.
Definition: pt-gfx-images.dox:14
Signal & timeout()
Notifies about interval timeouts.
Definition: Timer.h:155
void start(const Pt::Timespan &interval)
Starts the timer.
Notifies clients in constant intervals.
Definition: Timer.h:73
Multicast Signal to call multiple slots.
Definition: Signal.h:110
std::size_t interval() const
Returns the current timer interval in milliseconds.
void setActive(EventLoop &loop)
Sets the used event loop.
void stop()
Stops the timer.
void detach()
Detach from used event loop.
bool isStarted() const
Returs true if timer was started.
Represents time spans in microsecond resolution.
Definition: Timespan.h:63
Thread-safe event loop supporting I/O multiplexing and Timers.
Definition: EventLoop.h:74
EventLoop * loop()
Returns the used event loop.
Definition: Timer.h:95
Timer()
Default constructor.
void start(std::size_t interval)
Starts the timer.