From 54398c1583f18ef9daf1a9227691b14c3b7f4212 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Tue, 22 Mar 2022 22:32:55 +0200 Subject: libcamera: base: timer: Drop start() overload with int argument The start(unsigned int msec) overload is error-prone, as the argument unit can easily be mistaken in callers. Drop it and update all callers to use the start(std::chrono::milliseconds) overload instead. The callers now need to use std::chrono_literals. The using statement could be added to timer.h for convenience, but "using" is discouraged in header files to avoid namespace pollution. Update the callers instead, and while at it, sort the "using" statements alphabetically in tests. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Umang Jain --- src/libcamera/base/timer.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/libcamera/base') diff --git a/src/libcamera/base/timer.cpp b/src/libcamera/base/timer.cpp index 187336e3..74b060af 100644 --- a/src/libcamera/base/timer.cpp +++ b/src/libcamera/base/timer.cpp @@ -62,16 +62,6 @@ Timer::~Timer() stop(); } -/** - * \fn Timer::start(unsigned int msec) - * \brief Start or restart the timer with a timeout of \a msec - * \param[in] msec The timer duration in milliseconds - * - * If the timer is already running it will be stopped and restarted. - * - * \context This function is \threadbound. - */ - /** * \brief Start or restart the timer with a timeout of \a duration * \param[in] duration The timer duration in milliseconds -- cgit v1.2.1