Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
roc::core::Ticker Class Reference

Ticker. More...

#include <ticker.h>

Inheritance diagram for roc::core::Ticker:
roc::core::NonCopyable< T >

Public Types

typedef uint64_t ticks_t
 Number of ticks.
 

Public Member Functions

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

Detailed Description

Ticker.

Definition at line 23 of file ticker.h.

Member Typedef Documentation

◆ ticks_t

typedef uint64_t roc::core::Ticker::ticks_t

Number of ticks.

Definition at line 26 of file ticker.h.

Constructor & Destructor Documentation

◆ Ticker()

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

Initialize.

Remarks
freq defines the number of ticks per second.

Definition at line 31 of file ticker.h.

Member Function Documentation

◆ elapsed()

ticks_t 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.

◆ start()

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

Start ticker.

Definition at line 38 of file ticker.h.

◆ wait()

void roc::core::Ticker::wait ( ticks_t  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: