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 --- include/libcamera/base/timer.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/libcamera/base/timer.h b/include/libcamera/base/timer.h index 09f1d322..759b68ad 100644 --- a/include/libcamera/base/timer.h +++ b/include/libcamera/base/timer.h @@ -25,7 +25,6 @@ public: Timer(Object *parent = nullptr); ~Timer(); - void start(unsigned int msec) { start(std::chrono::milliseconds(msec)); } void start(std::chrono::milliseconds duration); void start(std::chrono::steady_clock::time_point deadline); void stop(); -- cgit v1.2.1