Timer for throttling messages, thread safe.
More...
#include <Throttle.h>
|
| Throttle (const char *name, double seconds_between_messages) |
| Create throttle with the given name and threshold. More...
|
|
void | reset () |
| Reset the throttle so that isPermitted will return 'true'. More...
|
|
void | fire () |
| Fire the throttle so that isPermitted will return 'false' until the threshold is exceeded.
|
|
bool | isPermitted (const epicsTime &when) |
|
bool | isPermitted () |
|
double | getThrottleThreshold () |
|
Timer for throttling messages, thread safe.
In order to avoid hundreds of similar messages, use the Throttle to check if it's OK to print the message.
Throttle::Throttle |
( |
const char * |
name, |
|
|
double |
seconds_between_messages |
|
) |
| |
Create throttle with the given name and threshold.
double Throttle::getThrottleThreshold |
( |
| ) |
|
|
inline |
- Returns
- Returns the message threshold in seconds.
bool Throttle::isPermitted |
( |
const epicsTime & |
when | ) |
|
- Returns
- Returns true when it's OK to print message at given time.
bool Throttle::isPermitted |
( |
| ) |
|
- Returns
- Returns true when it's OK to print another message now.
Reset the throttle so that isPermitted will return 'true'.
The documentation for this class was generated from the following file:
- /home/malitsky/projects/epics-archiver/sourceforge/trunk/ea4-cpp/include/common/tools/Throttle.h