Skip to content

Commit

Permalink
Added atomic time_point initialization (#3760)
Browse files Browse the repository at this point in the history
Signed-off-by: Javier Santiago <javiersantiago@eprosima.com>
  • Loading branch information
jsan-rt authored Jul 28, 2023
1 parent c3b4de3 commit 6e74c1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cpp/rtps/resources/TimedEventImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "TimedEventImpl.h"

#include <chrono>
#include <fastrtps/utils/TimeConversion.h>

namespace eprosima {
Expand All @@ -30,6 +31,7 @@ TimedEventImpl::TimedEventImpl(
Callback callback,
std::chrono::microseconds interval)
: interval_microsec_(interval)
, next_trigger_time_(std::chrono::steady_clock::now())
, callback_(std::move(callback))
, state_(StateCode::INACTIVE)
{
Expand Down

0 comments on commit 6e74c1e

Please sign in to comment.