A helper class to measure frequency of a certain event. More...
#include <pcl/common/time.h>
Public Member Functions | |
EventFrequency (std::size_t window_size=30) | |
Constructor. More... |
|
void | event () |
Notifies the class that the event occurred. More... |
|
double | getFrequency () const |
Retrieve the estimated frequency. More... |
|
void | reset () |
Reset frequency computation. More... |
|
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.
| inline |
Constructor.
[in] | window_size | number of most recent events that are considered in frequency estimation (default: 30) |
Definition at line 143 of file time.h.
References pcl::StopWatch::reset().
| inline |
Notifies the class that the event occurred.
Definition at line 150 of file time.h.
References pcl::StopWatch::getTimeSeconds().
| inline |
| inline |
Reset frequency computation.
Definition at line 168 of file time.h.
References pcl::StopWatch::reset().
© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1_event_frequency.html