Ardour  9.0-pre0-384-ga76afae0e9
ArdourSurface::NS_MCU::Timer Class Reference

#include <timer.h>

Public Member Functions

 Timer (bool shouldStart=true)
 
unsigned long start ()
 
unsigned long stop ()
 
unsigned long elapsed () const
 
unsigned long restart ()
 

Private Attributes

uint64_t _start
 
uint64_t _stop
 
bool running
 

Detailed Description

millisecond timer class.

Definition at line 35 of file surfaces/mackie/timer.h.

Constructor & Destructor Documentation

◆ Timer()

ArdourSurface::NS_MCU::Timer::Timer ( bool  shouldStart = true)
inline

start the timer running if true, or just create the object if false.

Definition at line 43 of file surfaces/mackie/timer.h.

Member Function Documentation

◆ elapsed()

unsigned long ArdourSurface::NS_MCU::Timer::elapsed ( ) const
inline

returns the number of milliseconds since start

Definition at line 71 of file surfaces/mackie/timer.h.

◆ restart()

unsigned long ArdourSurface::NS_MCU::Timer::restart ( )
inline

Call stop and then start. Return the value from stop.

Definition at line 87 of file surfaces/mackie/timer.h.

◆ start()

unsigned long ArdourSurface::NS_MCU::Timer::start ( void  )
inline

Start the timer running. Return the current timestamp, in milliseconds

Definition at line 52 of file surfaces/mackie/timer.h.

◆ stop()

unsigned long ArdourSurface::NS_MCU::Timer::stop ( void  )
inline

returns the number of milliseconds since start also stops the timer running

Definition at line 62 of file surfaces/mackie/timer.h.

Member Data Documentation

◆ _start

uint64_t ArdourSurface::NS_MCU::Timer::_start
private

Definition at line 95 of file surfaces/mackie/timer.h.

◆ _stop

uint64_t ArdourSurface::NS_MCU::Timer::_stop
private

Definition at line 96 of file surfaces/mackie/timer.h.

◆ running

bool ArdourSurface::NS_MCU::Timer::running
private

Definition at line 97 of file surfaces/mackie/timer.h.


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