Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::diagnostics::TickScope Struct Reference

Detailed Description

RAII scope for measuring a block of code. Usage: volatile uint32_t elapsed; { TickScope s(elapsed); /* code *‍/ }

Definition at line 36 of file ticks.hpp.

#include <ticks.hpp>

Public Member Functions

 TickScope (volatile uint32_t &out)
 
 ~TickScope ()
 

Public Attributes

uint32_t start_
 
volatile uint32_t & result_
 

Constructor & Destructor Documentation

◆ TickScope()

sbl::diagnostics::TickScope::TickScope ( volatile uint32_t &  out)
inlineexplicit

Definition at line 40 of file ticks.hpp.

◆ ~TickScope()

sbl::diagnostics::TickScope::~TickScope ( )
inline

Definition at line 42 of file ticks.hpp.

References result_, start_, and sbl::diagnostics::ticks().

Member Data Documentation

◆ start_

uint32_t sbl::diagnostics::TickScope::start_

Definition at line 37 of file ticks.hpp.

Referenced by ~TickScope().

◆ result_

volatile uint32_t& sbl::diagnostics::TickScope::result_

Definition at line 38 of file ticks.hpp.

Referenced by ~TickScope().


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