diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-03-24 10:26:32 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-03-24 10:26:32 +0100 |
commit | 9fe15716d3aeff387f4dbb7e85ebe22ac5755447 (patch) | |
tree | e9a53b8a7de7cb4c788d43ff11dd6004c14b65e5 /lib | |
parent | 37133dceeb541c42a02390e9a461d7c2802e6841 (diff) | |
download | dabmux-9fe15716d3aeff387f4dbb7e85ebe22ac5755447.tar.gz dabmux-9fe15716d3aeff387f4dbb7e85ebe22ac5755447.tar.bz2 dabmux-9fe15716d3aeff387f4dbb7e85ebe22ac5755447.zip |
Pull common efe0a08
Diffstat (limited to 'lib')
-rw-r--r-- | lib/edi/common.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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; } |