A helper class to measure frequency of a certain event.
More...
#include <pcl/common/time.h>
A helper class to measure frequency of a certain event.
To use this class create an instance and call event() function every time the event in question occurs. The estimated frequency can be retrieved with getFrequency() function.
- Author
- Sergey Alexandrov
Definition at line 151 of file time.h.
pcl::EventFrequency::EventFrequency |
( |
size_t |
window_size = 30 | ) |
|
|
inline |
Constructor.
- Parameters
-
[in] | window_size | number of most recent events that are considered in frequency estimation (default: 30) |
Definition at line 160 of file time.h.
void pcl::EventFrequency::event |
( |
| ) |
|
|
inline |
Notifies the class that the event occured.
Definition at line 167 of file time.h.
double pcl::EventFrequency::getFrequency |
( |
| ) |
const |
|
inline |
Retrieve the estimated frequency.
Definition at line 176 of file time.h.
void pcl::EventFrequency::reset |
( |
| ) |
|
|
inline |
Reset frequency computation.
Definition at line 185 of file time.h.
The documentation for this class was generated from the following file:
- /build/pcl-iwPQmU/pcl-1.8.0+dfsg1/common/include/pcl/common/time.h