Main Page | Class List | File List | Class Members | File Members

format_performance_counter Class Reference

Formats PerformanceCounter object as hours, minutes and optionally seconds, milliseconds and microseconds. More...

#include <PerformanceCounter.h>

List of all members.

Public Types

enum  { show_seconds = 1, show_milliseconds = 2, show_microseconds = 4, show_days = 8 }

Public Member Functions

 format_performance_counter (PerformanceCounter pc, int options=show_seconds|show_milliseconds|show_microseconds)

Static Public Member Functions

static int width (int options=show_seconds|show_milliseconds|show_microseconds)
 Returns width of stream according to options.

Public Attributes

PerformanceCounter m_pc
int m_options

Friends

std::ostream & operator<< (std::ostream &, const format_performance_counter &)


Detailed Description

Formats PerformanceCounter object as hours, minutes and optionally seconds, milliseconds and microseconds.

d+hh:mm:ss:mmm:uuu

Days are shown on request or when duration is more than 24 hours.

Regional setting for date separator is used.

Output width and alignment of stream is used.

Definition at line 130 of file PerformanceCounter.h.


Member Enumeration Documentation

anonymous enum
 

Enumerator:
show_seconds 
show_milliseconds 
show_microseconds 
show_days 

Definition at line 133 of file PerformanceCounter.h.


Constructor & Destructor Documentation

format_performance_counter::format_performance_counter PerformanceCounter  pc,
int  options = show_seconds | show_milliseconds | show_microseconds
[inline]
 

Definition at line 134 of file PerformanceCounter.h.


Member Function Documentation

int format_performance_counter::width int  options = show_seconds|show_milliseconds|show_microseconds  )  [static]
 

Returns width of stream according to options.

When days are requested the minimum width is returned.

Definition at line 77 of file PerformanceCounter.cpp.

References show_days, show_microseconds, show_milliseconds, and show_seconds.


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  os,
const format_performance_counter fpc
[friend]
 

Definition at line 22 of file PerformanceCounter.cpp.


Member Data Documentation

int format_performance_counter::m_options
 

Definition at line 145 of file PerformanceCounter.h.

Referenced by operator<<().

PerformanceCounter format_performance_counter::m_pc
 

Definition at line 144 of file PerformanceCounter.h.

Referenced by operator<<().


The documentation for this class was generated from the following files:
Generated on Sun Jun 26 13:44:01 2005 for pingem by  doxygen 1.4.3