GCGlib
0.04.228
GCG Graphics Engine
|
Class to estimate the number of events per second. More...
#include <gcg.h>
Public Member Functions | |
gcgEVENTSPERSECOND () | |
Constructs a new, independent events per second estimator. | |
virtual | ~gcgEVENTSPERSECOND () |
Frees all object resources. | |
void | startingEvents () |
Indicates that a series of events will occur. It gets the current time and waits until finishedEvents() is called to tell how many events occurred between the two calls. After this the events per second is updated. More... | |
float | finishedEvents (int nevents=1) |
Indicates that n events occurred since last call of startingEvents(). The events per second is then updated. More... | |
float | getEventsPerSecond () |
Returns current events-per-second. More... | |
Public Member Functions inherited from gcgCLASS | |
void * | operator new (size_t size) |
Defines a new operator to be used by instatiations of GCGlib classes instead the global one. More... | |
void * | operator new (size_t size, const std::nothrow_t &) throw () |
Defines a new operator to be used by instantiations of GCGlib classes instead the global one. Returns a NULL pointer instead of throwing an exception if an error occurs. More... | |
void * | operator new[] (size_t size) |
Defines a new operator to be used by GCGlib array allocations instead the global one. More... | |
void * | operator new[] (size_t size, const std::nothrow_t &) throw () |
Defines a new operator to be used by vector allocations instead the global one. More... | |
void | operator delete (void *p) |
Defines a delete operator to free instances of GCGlib classes instead the global one. It is designed to match the new operator. More... | |
void | operator delete (void *p, const std::nothrow_t &) throw () |
Defines a delete operator to free instances of GCGlib classes instead the global one. It is designed to match the new operator. More... | |
void | operator delete[] (void *p) |
Defines a delete operator to free instances of arrays for GCGlib classes instead the global one. It is designed to match the new[] operator. More... | |
void | operator delete[] (void *p, const std::nothrow_t &) throw () |
Defines a delete operator to free instances of arrays for GCGlib classes instead the global one. It is designed to match the new[] operator. More... | |
Private Attributes | |
void * | handle |
Internal handle of this object. | |
Class to estimate the number of events per second.
float gcgEVENTSPERSECOND::finishedEvents | ( | int | nevents = 1 | ) |
Indicates that n events occurred since last call of startingEvents(). The events per second is then updated.
[in] | nevents | number of events occurred since last call to startingEvents(). |
float gcgEVENTSPERSECOND::getEventsPerSecond | ( | ) |
Returns current events-per-second.
void gcgEVENTSPERSECOND::startingEvents | ( | ) |
Indicates that a series of events will occur. It gets the current time and waits until finishedEvents() is called to tell how many events occurred between the two calls. After this the events per second is updated.