diff options
Diffstat (limited to 'test/event-dispatcher.cpp')
-rw-r--r-- | test/event-dispatcher.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/test/event-dispatcher.cpp b/test/event-dispatcher.cpp index 9f9cf178..f71c1c0d 100644 --- a/test/event-dispatcher.cpp +++ b/test/event-dispatcher.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2019, Google Inc. * - * event-dispatcher.cpp - Event dispatcher test + * Event dispatcher test */ #include <chrono> @@ -10,14 +10,15 @@ #include <signal.h> #include <sys/time.h> -#include <libcamera/event_dispatcher.h> -#include <libcamera/timer.h> +#include <libcamera/base/event_dispatcher.h> +#include <libcamera/base/thread.h> +#include <libcamera/base/timer.h> #include "test.h" -#include "thread.h" -using namespace std; using namespace libcamera; +using namespace std; +using namespace std::chrono_literals; static EventDispatcher *dispatcher; static bool interrupt; @@ -50,7 +51,7 @@ protected: /* Event processing interruption by signal. */ std::chrono::steady_clock::time_point start = std::chrono::steady_clock::now(); - timer.start(1000); + timer.start(1000ms); struct itimerval itimer = {}; itimer.it_value.tv_usec = 500000; @@ -69,7 +70,7 @@ protected: } /* Event processing interruption. */ - timer.start(1000); + timer.start(1000ms); dispatcher->interrupt(); dispatcher->processEvents(); @@ -79,7 +80,7 @@ protected: return TestFail; } - timer.start(1000); + timer.start(1000ms); itimer.it_value.tv_usec = 500000; interrupt = true; setitimer(ITIMER_REAL, &itimer, nullptr); |