From ff455f075275e8c4d5fda68ca4278acfa73141e8 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Mon, 31 Jan 2022 15:28:46 -0600 Subject: [PATCH] Moving from high resolution timer to system_clock, trying to avoid a Mac build error --- src/Qt/PlayerPrivate.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Qt/PlayerPrivate.cpp b/src/Qt/PlayerPrivate.cpp index 75c325d5..123d0d40 100644 --- a/src/Qt/PlayerPrivate.cpp +++ b/src/Qt/PlayerPrivate.cpp @@ -64,7 +64,7 @@ namespace openshot // Init start_time of playback std::chrono::time_point start_time; - start_time = std::chrono::time_point_cast(std::chrono::high_resolution_clock::now()); ///< timestamp playback starts + start_time = std::chrono::time_point_cast(std::chrono::system_clock::now()); ///< timestamp playback starts while (!threadShouldExit()) { // Calculate on-screen time for a single frame @@ -82,7 +82,7 @@ namespace openshot audioPlayback->Seek(video_position); // Reset current playback start time - start_time = std::chrono::time_point_cast(std::chrono::high_resolution_clock::now()); + start_time = std::chrono::time_point_cast(std::chrono::system_clock::now()); playback_frames = 0; continue; @@ -96,7 +96,7 @@ namespace openshot last_video_position = video_position; // Calculate the diff between 'now' and the predicted frame end time - const auto current_time = std::chrono::high_resolution_clock::now(); + const auto current_time = std::chrono::system_clock::now(); const auto remaining_time = double_micro_sec(start_time + (frame_duration * playback_frames) - current_time);