timemory 3.3.0
Modular C++ Toolkit for Performance Analysis and Logging. Profiling API and Tools for C, C++, CUDA, Fortran, and Python. The C++ template API is essentially a framework to creating tools: it is designed to provide a unifying interface for recording various performance measurements alongside data logging and interfaces to other tools.
tim::component::monotonic_raw_clock Struct Reference

clock that increments monotonically, tracking the time since an arbitrary point like CLOCK_MONOTONIC. However, this clock is unaffected by frequency or time adjustments. It should not be compared to other system time sources. More...

#include "timemory/components/timing/components.hpp"

+ Collaboration diagram for tim::component::monotonic_raw_clock:

Public Types

using ratio_t = std::nano
 
using value_type = int64_t
 
using base_type = base< monotonic_raw_clock, value_type >
 
using storage_type = empty_storage
 

Public Member Functions

double get () const noexcept
 
double get_display () const noexcept
 
void start () noexcept
 
void stop () noexcept
 

Static Public Member Functions

static std::string label ()
 
static std::string description ()
 
static value_type record ()
 
template<typename... Args>
static opaque get_opaque (Args &&...)
 

Detailed Description

clock that increments monotonically, tracking the time since an arbitrary point like CLOCK_MONOTONIC. However, this clock is unaffected by frequency or time adjustments. It should not be compared to other system time sources.

Definition at line 171 of file components.hpp.

Member Typedef Documentation

◆ base_type

◆ ratio_t

Definition at line 173 of file components.hpp.

◆ storage_type

Definition at line 66 of file declaration.hpp.

◆ value_type

Definition at line 174 of file components.hpp.

Member Function Documentation

◆ description()

static std::string tim::component::monotonic_raw_clock::description ( )
inlinestatic

Definition at line 178 of file components.hpp.

179 {
180 return "Wall-clock timer unaffected by frequency or time adjustments in system "
181 "time-of-day clock";
182 }

◆ get()

double tim::component::monotonic_raw_clock::get ( ) const
inlinenoexcept

Definition at line 187 of file components.hpp.

188 {
189 return load() / static_cast<double>(base_type::get_unit());
190 }
static int64_t get_unit()

References tim::component::base< Tp, Value >::get_unit(), and tim::component::base< monotonic_raw_clock >::load().

Referenced by get_display().

◆ get_display()

double tim::component::monotonic_raw_clock::get_display ( ) const
inlinenoexcept

Definition at line 191 of file components.hpp.

191{ return get(); }
double get() const noexcept
Definition: components.hpp:187

References get().

◆ get_opaque()

template<typename... Args>
static opaque tim::component::empty_base::get_opaque ( Args &&  ...)
inlinestaticinherited

Definition at line 72 of file declaration.hpp.

73 {
74 return opaque{};
75 }

◆ label()

static std::string tim::component::monotonic_raw_clock::label ( )
inlinestatic

Definition at line 177 of file components.hpp.

177{ return "monotonic_raw_clock"; }

◆ record()

static value_type tim::component::monotonic_raw_clock::record ( )
inlinestatic

Definition at line 183 of file components.hpp.

184 {
185 return tim::get_clock_monotonic_raw_now<int64_t, ratio_t>();
186 }

Referenced by start(), and stop().

◆ start()

void tim::component::monotonic_raw_clock::start ( )
inlinenoexcept

Definition at line 192 of file components.hpp.

192{ value = record(); }

References record().

◆ stop()

void tim::component::monotonic_raw_clock::stop ( )
inlinenoexcept

Definition at line 193 of file components.hpp.

194 {
195 value = (record() - value);
196 accum += value;
197 }

References record().


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