GCGlib  0.04.228
GCG Graphics Engine
gcgEVENTSPERSECOND Class Reference

Class to estimate the number of events per second. More...

#include <gcg.h>

Inheritance diagram for gcgEVENTSPERSECOND:
gcgCLASS

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.
 

Detailed Description

Class to estimate the number of events per second.

Since
0.01.6

Member Function Documentation

◆ finishedEvents()

float gcgEVENTSPERSECOND::finishedEvents ( int  nevents = 1)

Indicates that n events occurred since last call of startingEvents(). The events per second is then updated.

Parameters
[in]neventsnumber of events occurred since last call to startingEvents().
See also
startingEvents()
getEventsPerSecond()
Returns
currently computed events-per-second estimation.

◆ getEventsPerSecond()

float gcgEVENTSPERSECOND::getEventsPerSecond ( )

Returns current events-per-second.

See also
startingEvents()
finishedEvents()
Returns
The last computed number of events per second.

◆ startingEvents()

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.

See also
finishedEvents()
getEventsPerSecond()

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