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 --- test/ipc/unixsocket.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/ipc') diff --git a/test/ipc/unixsocket.cpp b/test/ipc/unixsocket.cpp index 7e90e629..304e613b 100644 --- a/test/ipc/unixsocket.cpp +++ b/test/ipc/unixsocket.cpp @@ -30,8 +30,9 @@ #define CMD_LEN_CMP 3 #define CMD_JOIN 4 -using namespace std; using namespace libcamera; +using namespace std; +using namespace std::chrono_literals; int calculateLength(int fd) { @@ -430,7 +431,7 @@ private: if (ret) return ret; - timeout.start(200); + timeout.start(200ms); while (!callDone_) { if (!timeout.isRunning()) { cerr << "Call timeout!" << endl; -- cgit v1.2.1