Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jami::debug::Timer Class Reference

Ex: Timer t; std::this_thread::sleep_for(std::chrono::milliseconds(10)); JAMI_DBG() << "Task took " << t.getDuration<std::chrono::nanoseconds>() << " ns";. More...

#include <debug_utils.h>

Collaboration diagram for jami::debug::Timer:
Collaboration graph

Public Member Functions

template<class Period = std::ratio<1>>
uint64_t getDuration () const
 
void print (std::string_view action) const
 
 Timer (std::string_view name)
 
 ~Timer ()
 

Detailed Description

Ex: Timer t; std::this_thread::sleep_for(std::chrono::milliseconds(10)); JAMI_DBG() << "Task took " << t.getDuration<std::chrono::nanoseconds>() << " ns";.

Definition at line 48 of file debug_utils.h.

Constructor & Destructor Documentation

◆ Timer()

jami::debug::Timer::Timer ( std::string_view  name)
inline

Definition at line 51 of file debug_utils.h.

◆ ~Timer()

jami::debug::Timer::~Timer ( )
inline

Definition at line 53 of file debug_utils.h.

References jami::emitSignal(), and print().

Here is the call graph for this function:

Member Function Documentation

◆ getDuration()

template<class Period = std::ratio<1>>
uint64_t jami::debug::Timer::getDuration ( ) const
inline

Definition at line 58 of file debug_utils.h.

◆ print()

void jami::debug::Timer::print ( std::string_view  action) const
inline

Definition at line 64 of file debug_utils.h.

References jami::emitSignal(), and JAMI_DBG.

Referenced by ~Timer().

Here is the call graph for this function:

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