From 9fe15716d3aeff387f4dbb7e85ebe22ac5755447 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 24 Mar 2020 10:26:32 +0100 Subject: Pull common efe0a08 --- lib/edi/common.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/edi') diff --git a/lib/edi/common.cpp b/lib/edi/common.cpp index e4a51b4..134e14b 100644 --- a/lib/edi/common.cpp +++ b/lib/edi/common.cpp @@ -103,7 +103,10 @@ std::chrono::system_clock::time_point frame_timestamp_t::to_system_clock() const auto ts = chrono::system_clock::from_time_t(to_unix_epoch()); // PPS offset in seconds = tsta / 16384000 - ts += chrono::nanoseconds(std::lrint(tsta / 0.016384)); + // We cannot use nanosecond resolution because not all platforms use a + // system_clock that has nanosecond precision. It's not really important, + // as this function is only used for debugging. + ts += chrono::microseconds(std::lrint(tsta / 16.384)); return ts; } -- cgit v1.2.3