STXXL  1.4.0
 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 75 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 103 of file timer.h.

References stxxl::timestamp().

void stxxl::timer::reset ( )
inline

return accumulated time

Definition at line 96 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 121 of file timer.h.

References stxxl::timestamp().

void stxxl::timer::start ( )
inline

start timer

Examples:
examples/containers/sorter2.cpp.

Definition at line 82 of file timer.h.

References stxxl::timestamp().

void stxxl::timer::stop ( )
inline

stop timer

Examples:
examples/containers/sorter2.cpp.

Definition at line 89 of file timer.h.

References stxxl::timestamp().

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

return current timestamp

Definition at line 69 of file timer.h.

References stxxl::timestamp().

double stxxl::timer::useconds ( )
inline

return currently accumulated time in microseconds

Definition at line 112 of file timer.h.

References stxxl::timestamp().

Member Data Documentation

double stxxl::timer::accumulated
private

Definition at line 65 of file timer.h.

double stxxl::timer::last_clock
private

Definition at line 66 of file timer.h.

bool stxxl::timer::running
private

Definition at line 64 of file timer.h.


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