Throttler Class Reference

The Throttler class. More...

#include <ArmarXCore/core/util/Throttler.h>

Public Member Functions

bool check (const armarx::DateTime &timestamp) noexcept
 Check if enough time has passed since this function last returned true. More...
 
 Throttler (float frequency)
 Construct a new Throttler object. More...
 

Detailed Description

The Throttler class.

Use this class to e.g. process data only at a certain frequency.

Definition at line 34 of file Throttler.h.

Constructor & Destructor Documentation

◆ Throttler()

Throttler ( float  frequency)
explicit

Construct a new Throttler object.

Parameters
frequencyin [Hz] to check

Definition at line 7 of file Throttler.cpp.

Member Function Documentation

◆ check()

bool check ( const armarx::DateTime timestamp)
noexcept

Check if enough time has passed since this function last returned true.

Parameters
timestampin [µs]
Returns
true if enough time has passed since last time when function returned true.
false otherwise

Definition at line 13 of file Throttler.cpp.


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