12 #include <libcamera/base/private.h> 27 void start(std::chrono::milliseconds duration);
32 std::chrono::steady_clock::time_point
deadline()
const {
return deadline_; }
41 void unregisterTimer();
44 std::chrono::steady_clock::time_point deadline_;
void message(Message *msg) override
Message handler for the object.
Definition: timer.cpp:158
Top-level libcamera namespace.
Definition: backtrace.h:17
void stop()
Stop the timer.
Definition: timer.cpp:113
void start(std::chrono::milliseconds duration)
Start or restart the timer with a timeout of duration.
Definition: timer.cpp:73
Signal & slot implementation.
Single-shot timer interface.
Definition: timer.h:21
A message that can be posted to a Thread.
Definition: message.h:23
Timer(Object *parent=nullptr)
Construct a timer.
Definition: timer.cpp:55
Base object to support automatic signal disconnection.
Object * parent() const
Retrieve the object's parent.
Definition: object.h:47
Generic signal and slot communication mechanism.
Definition: object.h:20
Signal timeout
Signal emitted when the timer times out.
Definition: timer.h:34
Base object to support automatic signal disconnection.
Definition: object.h:24
std::chrono::steady_clock::time_point deadline() const
Retrieve the timer deadline.
Definition: timer.h:32
bool isRunning() const
Check if the timer is running.
Definition: timer.cpp:140