TBTK
Static Public Member Functions | List of all members
TBTK::Util::Timer Class Reference

#include <Util.h>

Static Public Member Functions

static void tick (std::string tag="")
 
static void tock ()
 

Detailed Description

A Timer for measuring execution times. A sequence of tick-tock calls will meassure and print the time from tick to tock. Multiple timestamps can be pushed onto the stack by repeated tick calls, and subsequent tock calls will return the time between the most recent tick call and then pop it.

Member Function Documentation

void TBTK::Util::Timer::tick ( std::string  tag = "")
inlinestatic

Bush timestamp onto stack.

Parameters
tagOptional identifier tag that will be printed together with the elapsed time at subsequent tock call.
void TBTK::Util::Timer::tock ( )
inlinestatic

Pop timestamp from stack and print elapsed time and identifier tag.


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