xentara-utils v1.2.1
Xentara utilities library
Loading...
Searching...
No Matches
xentara::utils::realTime::TimerSlackGuard Class Reference

This class sets the timer slack of the calling thread to a certain value for the duration of its lifetime. More...

#include <realTime/TimerSlackGuard.hpp>

Public Member Functions

 TimerSlackGuard (std::chrono::nanoseconds timerSlack)
 Constructor.
 
 ~TimerSlackGuard ()
 Destructor.
 

Detailed Description

This class sets the timer slack of the calling thread to a certain value for the duration of its lifetime.

Note
On operating systems that do not have a configurable timer slack, this class is a no-op.

Constructor & Destructor Documentation

◆ TimerSlackGuard()

xentara::utils::realTime::TimerSlackGuard::TimerSlackGuard ( std::chrono::nanoseconds  timerSlack)

Constructor.

The constructor sets the timer slack to the given value.

Note
On operating systems that do not have a configurable timer slack, this function is a no-op.

◆ ~TimerSlackGuard()

xentara::utils::realTime::TimerSlackGuard::~TimerSlackGuard ( )

Destructor.

The destructor resets the timer slack to what it was before the constructor was called.

Note
On operating systems that do not have a configurable timer slack, this function is a no-op.