Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::core::RateLimiter Class Reference

Rate limiter. More...

#include <rate_limiter.h>

Inheritance diagram for roc::core::RateLimiter:
Collaboration diagram for roc::core::RateLimiter:

Public Member Functions

 RateLimiter (nanoseconds_t period)
 Initialize rate limiter. More...
 
bool allow ()
 Check whether an event is allowed to occur now. More...
 

Detailed Description

Rate limiter.

Definition at line 22 of file rate_limiter.h.

Constructor & Destructor Documentation

roc::core::RateLimiter::RateLimiter ( nanoseconds_t  period)
inlineexplicit

Initialize rate limiter.

Remarks
period is tick duration in nanoseconds.

Definition at line 27 of file rate_limiter.h.

Member Function Documentation

bool roc::core::RateLimiter::allow ( )
inline

Check whether an event is allowed to occur now.

Definition at line 37 of file rate_limiter.h.


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