Loading...
Searching...
No Matches
pcl::EventFrequency Class Reference
Module common

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.
void | event ()
| Notifies the class that the event occurred.
double | getFrequency () const
| Retrieve the estimated frequency.
void | reset ()
| Reset frequency computation.

## Detailed Description

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 132 of file time.h.

## Constructor & Destructor Documentation

## EventFrequency()

pcl::EventFrequency::EventFrequency | ( | std::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 141 of file time.h.

References pcl::StopWatch::reset().

## Member Function Documentation

## event()

void pcl::EventFrequency::event | ( |  | ) |

inline

Notifies the class that the event occurred.

Definition at line 148 of file time.h.

References pcl::StopWatch::getTimeSeconds().

## getFrequency()

double pcl::EventFrequency::getFrequency | ( |  | ) | const

inline

Retrieve the estimated frequency.

Definition at line 157 of file time.h.

## reset()

void pcl::EventFrequency::reset | ( |  | ) |

inline

Reset frequency computation.

Definition at line 166 of file time.h.

References pcl::StopWatch::reset().

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

- pcl/common/time.h