mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 07:19:45 +03:00
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
parent
074fa98ac4
commit
54398c1583
19 changed files with 67 additions and 61 deletions
|
@ -22,9 +22,9 @@
|
|||
#include "camera_test.h"
|
||||
#include "test.h"
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
using namespace libcamera;
|
||||
using namespace std;
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
class FenceTest : public CameraTest, public Test
|
||||
{
|
||||
|
@ -316,7 +316,7 @@ int FenceTest::run()
|
|||
|
||||
/* Loop for one second. */
|
||||
Timer timer;
|
||||
timer.start(1000);
|
||||
timer.start(1000ms);
|
||||
while (timer.isRunning() && expectedCompletionResult_) {
|
||||
if (completedRequest_ == signalledRequestId_ && setFence_)
|
||||
/*
|
||||
|
@ -324,7 +324,7 @@ int FenceTest::run()
|
|||
* been re-queued with a fence. Start the timer to
|
||||
* signal the fence in 10 msec.
|
||||
*/
|
||||
fenceTimer.start(10);
|
||||
fenceTimer.start(10ms);
|
||||
|
||||
dispatcher_->processEvents();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue