VizKit
3.3.7
|
Provides facilities to deal with and calculate time values. More...
#include <VisualTiming.h>
Classes | |
struct | DurationItem |
A data entry that stores timing values of a duration item. More... | |
Static Public Member Functions | |
static void | dispose (void) |
Disposes the visual timing. | |
static void | update (void) |
Refreshes the current timestamp. | |
static uint32 | getElapsedMilliSecsSinceReset (const char *const durationName) |
Returns the number of milliseconds that have elapsed since first call of the duration item. | |
static uint32 | getElapsedMilliSecsSinceReset (const VisualItemIdentifier &visualDurationIdentifier) |
Returns the number of milliseconds that have elapsed since first call of the duration item. | |
static uint32 | getElapsedMilliSecsSinceLastCall (const char *const durationName) |
Returns the number of milliseconds that have elapsed since the last call of the duration item. | |
static uint32 | getElapsedMilliSecsSinceLastCall (const VisualItemIdentifier &visualDurationIdentifier) |
Returns the number of milliseconds that have elapsed since the last call of the duration item. | |
static void | resetTimestamp (const char *const durationName) |
Resets the stored timing values for this duration item. | |
static void | resetTimestamp (const VisualItemIdentifier &visualDurationIdentifier) |
Resets the stored timing values for this duration item. | |
static const char *const | getCurrentMillisecsDateTime (void) |
Returns the current date and time including milliseconds. | |
static void | addDurationItemToDurationMap (const VisualItemIdentifier &visualDurationIdentifier) |
Adds a duration item to the duration map. | |
Private Types | |
typedef std::map < VisualItemIdentifier, DurationItem * > | DurationMap |
A DurationMap is a map of duration items. | |
typedef DurationMap::iterator | DurationMapIterator |
A DurationMapIterator is the iterator of a DurationMap. | |
Private Member Functions | |
VisualTiming () | |
The constructor. | |
~VisualTiming () | |
The destructor. | |
VisualTiming (const VisualTiming &other) | |
Copy constructor. | |
VisualTiming & | operator= (const VisualTiming &other) |
Assignment operator. | |
Static Private Member Functions | |
static VisualTiming * | getInstance (void) |
Returns a pointer to the VisualTiming. | |
Private Attributes | |
DurationMap | durationMap |
The map of the duration items. | |
char | dateTimeStr [32] |
The frequency of QueryPerformanceFrequency. | |
Static Private Attributes | |
static VisualTiming * | theVisualTiming = NULL |
Returns the difference between one timestamp and another. |
Provides facilities to deal with and calculate time values.
All public methods are declared static.
typedef std::map<VisualItemIdentifier, DurationItem*> VizKit::VisualTiming::DurationMap [private] |
A DurationMap is a map of duration items.
typedef DurationMap::iterator VizKit::VisualTiming::DurationMapIterator [private] |
A DurationMapIterator is the iterator of a DurationMap.
VisualTiming::VisualTiming | ( | ) | [private] |
The constructor.
VisualTiming is a singleton class. The constructor is private. New instance of class can only be created internally.
VisualTiming::~VisualTiming | ( | ) | [private] |
The destructor.
VizKit::VisualTiming::VisualTiming | ( | const VisualTiming & | other | ) | [private] |
Copy constructor.
other | Another VisualTiming. |
void VisualTiming::addDurationItemToDurationMap | ( | const VisualItemIdentifier & | visualDurationIdentifier | ) | [static] |
Adds a duration item to the duration map.
visualDurationIdentifier | The identifier of the duration item. |
void VisualTiming::dispose | ( | void | ) | [static] |
Disposes the visual timing.
const char *const VisualTiming::getCurrentMillisecsDateTime | ( | void | ) | [static] |
Returns the current date and time including milliseconds.
The date and time are represented as YYYYMMDDHHMISS000 (year-month-day-hour-minute-seconds-milliseconds).
uint32 VisualTiming::getElapsedMilliSecsSinceLastCall | ( | const char *const | durationName | ) | [static] |
Returns the number of milliseconds that have elapsed since the last call of the duration item.
Time is measured individually for single duration items. The duration items are itentified by name. This function returns the milliseconds that have passed since the last render call.
durationName | The identifier of the duration. |
uint32 VisualTiming::getElapsedMilliSecsSinceLastCall | ( | const VisualItemIdentifier & | visualDurationIdentifier | ) | [static] |
Returns the number of milliseconds that have elapsed since the last call of the duration item.
Time is measured individually for single duration items. The duration items are itentified by name. This function returns the milliseconds that have passed since the last render call.
visualDurationIdentifier | The identifier of the duration. |
uint32 VisualTiming::getElapsedMilliSecsSinceReset | ( | const char *const | durationName | ) | [static] |
Returns the number of milliseconds that have elapsed since first call of the duration item.
Time is measured individually for single duration items. The duration items are itentified by name. This function returns the milliseconds that have passed since the duration item first asked for its elapsed milliseconds.
durationName | The identifier of the duration. |
uint32 VisualTiming::getElapsedMilliSecsSinceReset | ( | const VisualItemIdentifier & | visualDurationIdentifier | ) | [static] |
Returns the number of milliseconds that have elapsed since first call of the duration item.
Time is measured individually for single duration items. The duration items are itentified by name. This function returns the milliseconds that have passed since the duration item first asked for its elapsed milliseconds.
visualDurationIdentifier | The identifier of the duration. |
VisualTiming * VisualTiming::getInstance | ( | void | ) | [static, private] |
Returns a pointer to the VisualTiming.
Initializes VisualTiming if neccessary. VisualTiming is a singleton.
VisualTiming& VizKit::VisualTiming::operator= | ( | const VisualTiming & | other | ) | [private] |
Assignment operator.
void VisualTiming::resetTimestamp | ( | const char *const | durationName | ) | [static] |
Resets the stored timing values for this duration item.
Time is measured individually for single duration items. The duration items are itentified by name. This function resets the timing values for this duration item.
durationName | The identifier of the duration. |
void VisualTiming::resetTimestamp | ( | const VisualItemIdentifier & | visualDurationIdentifier | ) | [static] |
Resets the stored timing values for this duration item.
Time is measured individually for single duration items. The duration items are itentified by name. This function resets the timing values for this duration item.
visualDurationIdentifier | The identifier of the duration. |
void VisualTiming::update | ( | void | ) | [static] |
Refreshes the current timestamp.
char VizKit::VisualTiming::dateTimeStr[32] [private] |
The frequency of QueryPerformanceFrequency.
Windows only. A string representing date and time (YYYYMMDDHHMISS).
DurationMap VizKit::VisualTiming::durationMap [private] |
The map of the duration items.
VisualTiming * VisualTiming::theVisualTiming = NULL [static, private] |
Returns the difference between one timestamp and another.
young_timestamp | The timestamp that was recorded before old_timestamp. |
old_timestamp | The timestamp that was recorded after young_timestamp. |