summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2021-11-27 09:51:19 +0100
committerJacopo Mondi <jacopo@jmondi.org>2021-12-11 17:53:40 +0100
commit6705596e29ef3b8d990ff5b851bf3338118198e6 (patch)
tree2b51da66be44dda8b2bf4b3d652b21efa0f683b8 /src
parentf16acb275c85518c13e81ffa6503347abcc01dc5 (diff)
libcamera: Print Timer identifier
The Timer debug output does not report to which timer a condition refers to. Fix that by printing the Timer address. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/base/event_dispatcher_poll.cpp3
-rw-r--r--src/libcamera/base/timer.cpp4
2 files changed, 4 insertions, 3 deletions
diff --git a/src/libcamera/base/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp
index 8ee22d5a..7238a316 100644
--- a/src/libcamera/base/event_dispatcher_poll.cpp
+++ b/src/libcamera/base/event_dispatcher_poll.cpp
@@ -214,7 +214,8 @@ int EventDispatcherPoll::poll(std::vector<struct pollfd> *pollfds)
timeout = { 0, 0 };
LOG(Event, Debug)
- << "timeout " << timeout.tv_sec << "."
+ << "next timer " << nextTimer << " expires in "
+ << timeout.tv_sec << "."
<< std::setfill('0') << std::setw(9)
<< timeout.tv_nsec;
}
diff --git a/src/libcamera/base/timer.cpp b/src/libcamera/base/timer.cpp
index 9c54352d..187336e3 100644
--- a/src/libcamera/base/timer.cpp
+++ b/src/libcamera/base/timer.cpp
@@ -96,7 +96,7 @@ void Timer::start(std::chrono::milliseconds duration)
void Timer::start(std::chrono::steady_clock::time_point deadline)
{
if (Thread::current() != thread()) {
- LOG(Timer, Error) << "Timer can't be started from another thread";
+ LOG(Timer, Error) << "Timer " << this << " << can't be started from another thread";
return;
}
@@ -128,7 +128,7 @@ void Timer::stop()
return;
if (Thread::current() != thread()) {
- LOG(Timer, Error) << "Timer can't be stopped from another thread";
+ LOG(Timer, Error) << "Timer " << this << " can't be stopped from another thread";
return;
}