STXXL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::timer Class Reference

Detailed Description

Public Member Functions

 timer (bool start_immediately=false)
 
double mseconds ()
 return currently accumulated time in milliseconds More...
 
void reset ()
 return accumulated time More...
 
double seconds ()
 return currently accumulated time in seconds (as double) More...
 
void start ()
 start timer More...
 
void stop ()
 stop timer More...
 
double useconds ()
 return currently accumulated time in microseconds More...
 

Static Private Member Functions

static double timestamp ()
 return current timestamp More...
 

Private Attributes

double accumulated
 
double last_clock
 
bool running
 

Constructor & Destructor Documentation

stxxl::timer::timer ( bool  start_immediately = false)
inline

Definition at line 77 of file timer.h.

Member Function Documentation

double stxxl::timer::mseconds ( )
inline

return currently accumulated time in milliseconds

Examples:
examples/containers/sorter2.cpp.

Definition at line 105 of file timer.h.

References stxxl::timestamp().

void stxxl::timer::reset ( )
inline

return accumulated time

Definition at line 98 of file timer.h.

References stxxl::timestamp().

double stxxl::timer::seconds ( )
inline

return currently accumulated time in seconds (as double)

Examples:
examples/containers/copy_file.cpp.

Definition at line 123 of file timer.h.

References stxxl::timestamp().

void stxxl::timer::start ( )
inline

start timer

Examples:
examples/containers/sorter2.cpp.

Definition at line 84 of file timer.h.

References stxxl::timestamp().

void stxxl::timer::stop ( )
inline

stop timer

Examples:
examples/containers/sorter2.cpp.

Definition at line 91 of file timer.h.

References stxxl::timestamp().

static double stxxl::timer::timestamp ( )
inlinestaticprivate

return current timestamp

Definition at line 71 of file timer.h.

References stxxl::timestamp().

double stxxl::timer::useconds ( )
inline

return currently accumulated time in microseconds

Definition at line 114 of file timer.h.

References stxxl::timestamp().

Member Data Documentation

double stxxl::timer::accumulated
private

Definition at line 67 of file timer.h.

double stxxl::timer::last_clock
private

Definition at line 68 of file timer.h.

bool stxxl::timer::running
private

Definition at line 66 of file timer.h.


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