Skip to content

Commit

Permalink
iox-eclipse-iceoryx#337 remove the explicit call for the semaphore de…
Browse files Browse the repository at this point in the history
…structor within timer

Signed-off-by: Sankara Narayanan Chandrasekar (RBEI/EMT2) <[email protected]>
  • Loading branch information
shankar-in committed Apr 27, 2021
1 parent 694b53b commit e5554a3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion iceoryx_utils/include/iceoryx_utils/cxx/timer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Timer
Timer(const iox::units::Duration interval, const iox::units::Duration delayThreshold = 0_ms) noexcept;

/// @brief Stops and joins the thread spawned by the constructor.
~Timer() noexcept;
virtual ~Timer() noexcept = default;

/// @brief (re-)Starts the timer. This also calculates the time until the timer goes to sleep and next time of
/// activation. This also acquires the binary semaphore.
Expand Down
5 changes: 0 additions & 5 deletions iceoryx_utils/source/cxx/timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ Timer::Timer(const iox::units::Duration interval, const iox::units::Duration del
start();
}

Timer::~Timer() noexcept
{
m_waitSemaphore.~Semaphore();
}

void Timer::start() noexcept
{
stop();
Expand Down

0 comments on commit e5554a3

Please sign in to comment.