Simple statistics.
More...
Simple statistics.
Definition at line 18 of file statistics.h.
◆ cStatistics()
Creates a new statistics object.
- Parameters
-
strIdentifier | [in] The identifier string, default is 'unknown'. |
nLogDelay | [in] The update rate at which statistics should be printed (milliseconds). |
strIntMask | [in] printf-style format specification for integer values. |
strFloatMask | [in] printf-style format specification for floating-point values. |
- Note
- if both strIntMask and strFloatMask are nullptr, the following float mask is used: [s] %0.1f Updates/Sec
◆ GetFloatValue()
Returns the update rate.
- Returns
- The update rate (updates per second).
- This method is real-time safe.\nSee @ref page_real_time_safe.\n
◆ GetIntValue()
Returns the number of recorded events.
- Returns
- The number of recorded events.
- This method is real-time safe.\nSee @ref page_real_time_safe.\n
◆ Init()
tVoid Init |
( |
const tChar * |
strIdentifier, |
|
|
tInt |
nLogDelay = 5000 , |
|
|
const tChar * |
strIntMask = nullptr , |
|
|
const tChar * |
strFloatMask = nullptr |
|
) |
| |
(Re)initializes a statistics object.
- Parameters
-
strIdentifier | [in] The identifier string, default is 'unknown'. |
nLogDelay | [in] The update rate at which statistics should be printed. |
strIntMask | [in] printf-style format specification for integer values. |
strFloatMask | [in] printf-style format specification for floating-point values. |
- Returns
- void
- Note
- if both strIntMask and strFloatMask are nullptr, the following float mask is used: [s] %0.1f Updates/Sec
◆ IsUpdated()
Whether or not events have already occured.
- Returns
- Whether or not events have already occured.
- This method is real-time safe.\nSee @ref page_real_time_safe.\n
◆ Reset()
Resets all statistics.
- Returns
- void
- This method is real-time safe.\nSee @ref page_real_time_safe.\n
◆ Update()
Adds new events to the object.
- Parameters
-
nCount | [in] How many events have occured. |
- Returns
- void