From 5172af93291d81798d7ebcdca08ae95ac5d41888 Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Fri, 18 Feb 2022 14:29:45 +0100 Subject: [PATCH 1/2] iox-#1130 Replace high_resolution_clock with system_clock and steady_clock --- iceoryx_examples/iceperf/base.cpp | 4 ++-- iceoryx_hoofs/source/log/logstream.cpp | 2 +- iceoryx_posh/source/runtime/ipc_runtime_interface.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iceoryx_examples/iceperf/base.cpp b/iceoryx_examples/iceperf/base.cpp index f3d25c34a6..88e65f3c96 100644 --- a/iceoryx_examples/iceperf/base.cpp +++ b/iceoryx_examples/iceperf/base.cpp @@ -35,7 +35,7 @@ void IcePerfBase::releaseFollower() noexcept iox::units::Duration IcePerfBase::latencyPerfTestLeader(const uint64_t numRoundTrips) noexcept { - auto start = std::chrono::high_resolution_clock::now(); + auto start = std::chrono::steady_clock::now(); // run the performance test for (auto i = 0U; i < numRoundTrips; ++i) @@ -44,7 +44,7 @@ iox::units::Duration IcePerfBase::latencyPerfTestLeader(const uint64_t numRoundT sendPerfTopic(perfTopic.payloadSize, RunFlag::RUN); } - auto finish = std::chrono::high_resolution_clock::now(); + auto finish = std::chrono::steady_clock::now(); constexpr uint64_t TRANSMISSIONS_PER_ROUNDTRIP{2U}; auto duration = std::chrono::duration_cast(finish - start); diff --git a/iceoryx_hoofs/source/log/logstream.cpp b/iceoryx_hoofs/source/log/logstream.cpp index 2601fcd7f0..39490860ef 100644 --- a/iceoryx_hoofs/source/log/logstream.cpp +++ b/iceoryx_hoofs/source/log/logstream.cpp @@ -33,7 +33,7 @@ LogStream::LogStream(Logger& logger, LogLevel logLevel) noexcept { m_logEntry.level = logLevel; /// @todo do we want to do this only when loglevel is higher than global loglevel? - auto timePoint = std::chrono::high_resolution_clock::now(); + auto timePoint = std::chrono::system_clock::now(); m_logEntry.time = std::chrono::duration_cast(timePoint.time_since_epoch()); } diff --git a/iceoryx_posh/source/runtime/ipc_runtime_interface.cpp b/iceoryx_posh/source/runtime/ipc_runtime_interface.cpp index 658cd20e8c..72b5bcde9b 100644 --- a/iceoryx_posh/source/runtime/ipc_runtime_interface.cpp +++ b/iceoryx_posh/source/runtime/ipc_runtime_interface.cpp @@ -75,10 +75,10 @@ IpcRuntimeInterface::IpcRuntimeInterface(const RuntimeName_t& roudiName, { using namespace units; using namespace std::chrono; - auto timestamp = duration_cast(high_resolution_clock::now().time_since_epoch()).count(); + auto timestamp = duration_cast(system_clock::now().time_since_epoch()).count(); while (transmissionTimestamp == timestamp) { - timestamp = duration_cast(high_resolution_clock::now().time_since_epoch()).count(); + timestamp = duration_cast(system_clock::now().time_since_epoch()).count(); } transmissionTimestamp = timestamp; From 7972c69470a429a6b0b6c3a07c976431cd035b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietrich=20Kr=C3=B6nke?= Date: Fri, 18 Feb 2022 17:24:36 +0100 Subject: [PATCH 2/2] iox-#1130 Update Changelog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Dietrich Krönke --- doc/website/release-notes/iceoryx-v2-0-0.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/website/release-notes/iceoryx-v2-0-0.md b/doc/website/release-notes/iceoryx-v2-0-0.md index f24a73a04a..e9b9c57299 100644 --- a/doc/website/release-notes/iceoryx-v2-0-0.md +++ b/doc/website/release-notes/iceoryx-v2-0-0.md @@ -46,6 +46,7 @@ - When posix mutex fails a correct error message is reported on the console [\#999](https://github.com/eclipse-iceoryx/iceoryx/issues/999) - Only use `std::result_of` for C++14 to be able to use iceoryx in C++20 projects [\#1076](https://github.com/eclipse-iceoryx/iceoryx/issues/1076) - Set stack size for windows in `singleprocess` example and posh tests [\#1082](https://github.com/eclipse-iceoryx/iceoryx/issues/1082) +- Roudi console timestamps is out of date [#1130](https://github.com/eclipse-iceoryx/iceoryx/issues/1130) **Refactoring:**