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

Ticker. More...

#include <ticker.h>

Inheritance diagram for roc::core::Ticker:
Collaboration diagram for roc::core::Ticker:

Public Types

typedef uint64_t Ticks
 Number of ticks. More...
 

Public Member Functions

 Ticker (Ticks freq)
 Initialize. More...
 
void start ()
 Start ticker. More...
 
Ticks elapsed ()
 Returns number of ticks elapsed since start. If ticker is not started yet, it is started automatically. More...
 
void wait (Ticks ticks)
 Wait until the given number of ticks elapses since start. If ticker is not started yet, it is started automatically. More...
 

Detailed Description

Ticker.

Definition at line 23 of file ticker.h.

Member Typedef Documentation

typedef uint64_t roc::core::Ticker::Ticks

Number of ticks.

Definition at line 26 of file ticker.h.

Constructor & Destructor Documentation

roc::core::Ticker::Ticker ( Ticks  freq)
inlineexplicit

Initialize.

Remarks
freq defines the number of ticks per second.

Definition at line 31 of file ticker.h.

Member Function Documentation

Ticks roc::core::Ticker::elapsed ( )
inline

Returns number of ticks elapsed since start. If ticker is not started yet, it is started automatically.

Definition at line 48 of file ticker.h.

void roc::core::Ticker::start ( )
inline

Start ticker.

Definition at line 38 of file ticker.h.

void roc::core::Ticker::wait ( Ticks  ticks)
inline

Wait until the given number of ticks elapses since start. If ticker is not started yet, it is started automatically.

Definition at line 59 of file ticker.h.


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