STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::scoped_print_timer Class Reference

Detailed Description

Simple scoped timer, which takes a text message and prints the duration until the scope is destroyed.

Examples:
examples/containers/vector_buf.cpp.

Definition at line 227 of file timer.h.

+ Collaboration diagram for stxxl::scoped_print_timer:

Public Member Functions

 scoped_print_timer (const std::string &message, const uint64 bytes=0)
 save message and start timer More...
 
 ~scoped_print_timer ()
 on destruction: tell the time More...
 
const stxxl::timertimer () const
 constant access to enclosed timer More...
 

Protected Attributes

uint64 m_bytes
 bytes processed More...
 
std::string m_message
 message More...
 
stxxl::timer m_timer
 timer More...
 

Constructor & Destructor Documentation

stxxl::scoped_print_timer::scoped_print_timer ( const std::string &  message,
const uint64  bytes = 0 
)
inline

save message and start timer

Definition at line 241 of file timer.h.

References STXXL_MSG.

stxxl::scoped_print_timer::~scoped_print_timer ( )
inline

on destruction: tell the time

Definition at line 250 of file timer.h.

References stxxl::format_IEC_size(), and STXXL_MSG.

Member Function Documentation

const stxxl::timer& stxxl::scoped_print_timer::timer ( ) const
inline

constant access to enclosed timer

Definition at line 269 of file timer.h.

Member Data Documentation

uint64 stxxl::scoped_print_timer::m_bytes
protected

bytes processed

Definition at line 234 of file timer.h.

std::string stxxl::scoped_print_timer::m_message
protected

message

Definition at line 231 of file timer.h.

stxxl::timer stxxl::scoped_print_timer::m_timer
protected

timer

Definition at line 237 of file timer.h.


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