Allows to monitor an event processing times, allowing to throttle the processing to one per THROTTLE_DELAY_SEC.
More...
#include <ut0ut.h>
|
| Throttler () |
|
bool | apply () |
| Checks if the item should be processed or ignored to not process them more frequently than one per THROTTLE_DELAY_SEC. More...
|
|
|
static constexpr uint64_t | THROTTLE_DELAY_SEC = 10 |
| Throttle all items within that amount seconds from the last non throttled one. More...
|
|
Allows to monitor an event processing times, allowing to throttle the processing to one per THROTTLE_DELAY_SEC.
◆ Throttler()
ib::Throttler::Throttler |
( |
| ) |
|
|
inline |
◆ apply()
bool ib::Throttler::apply |
( |
| ) |
|
|
inline |
Checks if the item should be processed or ignored to not process them more frequently than one per THROTTLE_DELAY_SEC.
◆ m_last_applied_time
std::atomic<uint64_t> ib::Throttler::m_last_applied_time |
|
private |
◆ THROTTLE_DELAY_SEC
constexpr uint64_t ib::Throttler::THROTTLE_DELAY_SEC = 10 |
|
staticconstexprprivate |
Throttle all items within that amount seconds from the last non throttled one.
The documentation for this class was generated from the following file: