rad 6.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rad::Timer Class Reference

#include <timer.hpp>

Public Member Functions

 Timer (boost::asio::io_context &ios, SMAdapter &sm, UniqueEvent &&event)
 
virtual ~Timer ()
 
void Install (const long timeout)
 
void Cancel ()
 
 Timer (const Timer &)=delete
 
Timeroperator= (const Timer &)=delete
 

Detailed Description

This class can be used to trigger an event when a timer expires.

Constructor & Destructor Documentation

◆ Timer() [1/2]

rad::Timer::Timer ( boost::asio::io_context & ios,
SMAdapter & sm,
UniqueEvent && event )
Parameters
[in]iosEvent loop used by the application.
[in]smReference to the SM adapter used to trigger events.
[in]eventEvent to be triggered when the timer expires.

◆ ~Timer()

rad::Timer::~Timer ( )
virtual

Cancel the timer if it is active.

◆ Timer() [2/2]

rad::Timer::Timer ( const Timer & )
delete

Member Function Documentation

◆ Cancel()

void rad::Timer::Cancel ( )

Cancel an installed deadline timer.

◆ Install()

void rad::Timer::Install ( const long timeout)

Install a deadline timer that expires after the given time.

Parameters
[in]timeoutDeadline time in msec. from now.

◆ operator=()

Timer & rad::Timer::operator= ( const Timer & )
delete

The documentation for this class was generated from the following files: