Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::diag::routing::DelayTimer Class Reference

A thread-safe countdown timer running on a different thread. More...

#include <delay_timer.h>

Public Member Functions

 DelayTimer (const DelayTimer &)=delete
 
DelayTimeroperator= (const DelayTimer &)=delete
 
void Start (std::chrono::seconds delayDuration)
 Start the timer if it has not been started yet. More...
 
bool IsActive () const noexcept
 Indicate whether the timer is active or not. More...
 
void Dispose ()
 Release resources aquired by the timer.
 

Detailed Description

A thread-safe countdown timer running on a different thread.

Member Function Documentation

◆ IsActive()

bool ara::diag::routing::DelayTimer::IsActive ( ) const
noexcept

Indicate whether the timer is active or not.

Returns
True if the timer is active, otherwise false

◆ Start()

void ara::diag::routing::DelayTimer::Start ( std::chrono::seconds  delayDuration)

Start the timer if it has not been started yet.

Parameters
delayDurationTimer delay duration in [sec]
Note
The caller will be blocked until the timer has been started.