Rcpp Version 1.1.2
Loading...
Searching...
No Matches
Rcpp::Timer Class Reference

#include <Timer.h>

Public Member Functions

 Timer ()
 Timer (nanotime_t start_time_)
void step (const std::string &name)
 operator SEXP () const
nanotime_t now () const
nanotime_t origin () const

Static Public Member Functions

static std::vector< Timerget_timers (int n)

Private Types

typedef std::pair< std::string, nanotime_tStep
typedef std::vector< StepSteps

Private Attributes

Steps data
const nanotime_t start_time

Detailed Description

Definition at line 103 of file Timer.h.

Member Typedef Documentation

◆ Step

typedef std::pair<std::string,nanotime_t> Rcpp::Timer::Step
private

Definition at line 137 of file Timer.h.

◆ Steps

typedef std::vector<Step> Rcpp::Timer::Steps
private

Definition at line 138 of file Timer.h.

Constructor & Destructor Documentation

◆ Timer() [1/2]

Rcpp::Timer::Timer ( )
inline

Definition at line 105 of file Timer.h.

References data, and start_time.

Referenced by get_timers().

◆ Timer() [2/2]

Rcpp::Timer::Timer ( nanotime_t start_time_)
inline

Definition at line 106 of file Timer.h.

References data, and start_time.

Member Function Documentation

◆ get_timers()

std::vector< Timer > Rcpp::Timer::get_timers ( int n)
inlinestatic

Definition at line 124 of file Timer.h.

References Timer().

Here is the call graph for this function:

◆ now()

nanotime_t Rcpp::Timer::now ( ) const
inline

Definition at line 128 of file Timer.h.

Referenced by step().

◆ operator SEXP()

Rcpp::Timer::operator SEXP ( ) const
inline

Definition at line 112 of file Timer.h.

References Rcpp::AttributeProxyPolicy< CLASS >::attr(), data, and start_time.

Here is the call graph for this function:

◆ origin()

nanotime_t Rcpp::Timer::origin ( ) const
inline

Definition at line 132 of file Timer.h.

References start_time.

◆ step()

void Rcpp::Timer::step ( const std::string & name)
inline

Definition at line 108 of file Timer.h.

References data, and now().

Here is the call graph for this function:

Member Data Documentation

◆ data

Steps Rcpp::Timer::data
private

Definition at line 140 of file Timer.h.

Referenced by operator SEXP(), step(), Timer(), and Timer().

◆ start_time

const nanotime_t Rcpp::Timer::start_time
private

Definition at line 141 of file Timer.h.

Referenced by operator SEXP(), origin(), Timer(), and Timer().


The documentation for this class was generated from the following file:
  • inst/include/Rcpp/Benchmark/Timer.h