Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::runtime::HighResolutionTimer Class Reference

#include <high_resolution_timer.hpp>

Public Member Functions

 HighResolutionTimer ()=default
 ~HighResolutionTimer ()
void start (std::chrono::microseconds interval, std::function< void()> callback)
 Start the timer with the given interval. Callback runs on a dedicated thread.
void start (std::chrono::microseconds interval, std::function< void()> callback, TimerMode mode)
 Start the timer in the requested mode.
void stop ()
 Stop the timer.
bool is_running () const
 Whether the timer is currently running.
TimerMode active_mode () const
 The backend actually in use for the current run (may differ from the requested mode when the platform doesn't support it).
 HighResolutionTimer (const HighResolutionTimer &)=delete
HighResolutionTimer & operator= (const HighResolutionTimer &)=delete

Constructor & Destructor Documentation

◆ HighResolutionTimer() [1/2]

pulp::runtime::HighResolutionTimer::HighResolutionTimer ( )
default

◆ ~HighResolutionTimer()

pulp::runtime::HighResolutionTimer::~HighResolutionTimer ( )

◆ HighResolutionTimer() [2/2]

pulp::runtime::HighResolutionTimer::HighResolutionTimer ( const HighResolutionTimer & )
delete

Member Function Documentation

◆ active_mode()

TimerMode pulp::runtime::HighResolutionTimer::active_mode ( ) const
inline

The backend actually in use for the current run (may differ from the requested mode when the platform doesn't support it).

◆ is_running()

bool pulp::runtime::HighResolutionTimer::is_running ( ) const
inline

Whether the timer is currently running.

◆ operator=()

HighResolutionTimer & pulp::runtime::HighResolutionTimer::operator= ( const HighResolutionTimer & )
delete

◆ start() [1/2]

void pulp::runtime::HighResolutionTimer::start ( std::chrono::microseconds interval,
std::function< void()> callback )

Start the timer with the given interval. Callback runs on a dedicated thread.

◆ start() [2/2]

void pulp::runtime::HighResolutionTimer::start ( std::chrono::microseconds interval,
std::function< void()> callback,
TimerMode mode )

Start the timer in the requested mode.

Falls back to DedicatedThread if the requested backend is unavailable on this platform.

◆ stop()

void pulp::runtime::HighResolutionTimer::stop ( )

Stop the timer.


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