StackTicToc Struct Reference

#include <tools/timer.hpp>

Collaboration diagram for StackTicToc:
[legend]

List of all members.

Public Types

enum  Unit {
  S = 1,
  MS = 1000,
  US = 1000000
}

Public Member Functions

 StackTicToc (Unit def=MS)
void tic ()
double toc (const Unit factor)
void toc (std::ostream &os, double SMOOTH=1)

Static Public Member Functions

static std::string unitName (Unit u)

Public Attributes

Unit DEFAULT_UNIT
std::stack< struct timeval > stack
struct timeval t0

Member Enumeration Documentation

Enumerator:
S 
MS 
US 

Constructor & Destructor Documentation

StackTicToc::StackTicToc ( Unit  def = MS) [inline]

Member Function Documentation

void StackTicToc::tic ( ) [inline]

References stack, and t0.

double StackTicToc::toc ( const Unit  factor) [inline]

References stack, and t0.

Referenced by toc().

void StackTicToc::toc ( std::ostream &  os,
double  SMOOTH = 1 
) [inline]

References DEFAULT_UNIT, SMOOTH, toc(), and unitName().

static std::string StackTicToc::unitName ( Unit  u) [inline, static]

References MS, S, and US.

Referenced by toc().


Member Data Documentation

std::stack<struct timeval> StackTicToc::stack

Referenced by tic(), and toc().

struct timeval StackTicToc::t0

Referenced by tic(), and toc().