From a66adb6dcd639cfb934146cf9714908c48ec7ce1 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 31 Dec 2021 18:36:23 -0500 Subject: [PATCH] fix SteadyClock vs Systemclock issues --- src/zm_monitor.h | 3 +++ src/zm_monitorstream.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/zm_monitor.h b/src/zm_monitor.h index b56a5fdd8..443cd1318 100644 --- a/src/zm_monitor.h +++ b/src/zm_monitor.h @@ -534,6 +534,9 @@ public: return shared_data->last_viewed_time; return 0; } + void setLastViewed() { + setLastViewed(std::chrono::system_clock::now()); + } void setLastViewed(SystemTimePoint new_time) { if (shared_data && shared_data->valid) shared_data->last_viewed_time = diff --git a/src/zm_monitorstream.cpp b/src/zm_monitorstream.cpp index 64cc5fc46..c978d5cc8 100644 --- a/src/zm_monitorstream.cpp +++ b/src/zm_monitorstream.cpp @@ -582,7 +582,7 @@ void MonitorStream::runStream() { } now = std::chrono::steady_clock::now(); - monitor->setLastViewed(now); + monitor->setLastViewed(); bool was_paused = paused; bool got_command = false; // commands like zoom should output a frame even if paused