stlab.adobe.com Adobe Systems Incorporated

timer_t Class Reference

#include <timer.hpp>

List of all members.

Public Types

typedef accumulator_type::size_type size_type

Public Member Functions

void accrue ()
double accrued_average () const
double accrued_max () const
double accrued_median () const
double accrued_min () const
double accrued_total () const
bool empty () const
void report (const char *decoration, std::ostream &s=std::cout)
void reset ()
void reset_accumulator ()
size_type size () const
double split ()

Detailed Description

Definition at line 126 of file timer.hpp.


Member Typedef Documentation

typedef accumulator_type::size_type size_type

Definition at line 139 of file timer.hpp.


Member Function Documentation

void accrue (  )

Grabs a new split time and stores it in the accumulator.

Definition at line 224 of file timer.hpp.

double accrued_average (  ) const
Returns:
The average of the split times in the accumulator, in milliseconds

Definition at line 248 of file timer.hpp.

double accrued_max (  ) const
Returns:
The largest of the split times in the accumulator, in milliseconds

Definition at line 240 of file timer.hpp.

double accrued_median (  ) const
Returns:
The median of the split times in the accumulator, in milliseconds

Definition at line 256 of file timer.hpp.

double accrued_min (  ) const
Returns:
The smallest of the split times in the accumulator, in milliseconds

Definition at line 232 of file timer.hpp.

double accrued_total (  ) const
Returns:
The summation of the split times in the accumulator, in milliseconds

Definition at line 274 of file timer.hpp.

bool empty (  ) const
Returns:
Whether or not there are any split times in the accumulator

Definition at line 290 of file timer.hpp.

void report ( const char *  decoration,
std::ostream &  s = std::cout 
)

An archaic utility function that takes a new split time and outputs it to a stream

Parameters:
decorationAn identifier to apply to the split time.
sThe stream to which output is written. Defaults to std::cout

Definition at line 300 of file timer.hpp.

void reset (  )

Resets the epoch of the timer to now

Definition at line 180 of file timer.hpp.

void reset_accumulator (  )

Resets the split time accumulator

Definition at line 195 of file timer.hpp.

size_type size (  ) const
Returns:
The number of split times in the accumulator

Definition at line 282 of file timer.hpp.

double split (  )
Returns:
The difference of time between the epoch and now, in milliseconds

Definition at line 203 of file timer.hpp.

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google