From e85f42110f411ec9c9b30d7f8f1a57c02e9cb01f Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 6 Oct 2019 06:40:32 +0300 Subject: libcamera: timer: Remove the interval() method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The libcamera timers are single-shot timers. They are started with a duration, but fire once only, not based on an interval. Remove the interval concept by removing the interval() method, and rename other occurences of interval to duration. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Jacopo Mondi --- include/libcamera/timer.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'include') diff --git a/include/libcamera/timer.h b/include/libcamera/timer.h index 476ae45f..09f426a5 100644 --- a/include/libcamera/timer.h +++ b/include/libcamera/timer.h @@ -24,11 +24,10 @@ public: ~Timer(); void start(unsigned int msec) { start(std::chrono::milliseconds(msec)); } - void start(std::chrono::milliseconds interval); + void start(std::chrono::milliseconds duration); void stop(); bool isRunning() const; - std::chrono::milliseconds interval() const { return interval_; } std::chrono::steady_clock::time_point deadline() const { return deadline_; } Signal timeout; @@ -40,7 +39,6 @@ private: void registerTimer(); void unregisterTimer(); - std::chrono::milliseconds interval_; std::chrono::steady_clock::time_point deadline_; }; -- cgit v1.2.1