|
KiCad PCB EDA Suite
|
Rate-limiter that fires at most once per interval. More...
#include <throttle.h>
Public Member Functions | |
| THROTTLE (std::chrono::milliseconds aInterval) | |
| bool | Ready () |
Private Attributes | |
| std::chrono::milliseconds | m_interval |
| std::chrono::steady_clock::time_point | m_last |
Rate-limiter that fires at most once per interval.
The first call to Ready() always returns true so callers can emit an initial update immediately.
Definition at line 34 of file throttle.h.
|
inlineexplicit |
Definition at line 37 of file throttle.h.
References m_interval, and m_last.
|
inline |
Definition at line 48 of file throttle.h.
References m_interval, and m_last.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), ALLEGRO::BOARD_BUILDER::BuildBoard(), ALLEGRO::PARSER::readObjects(), SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(), and SYMBOL_EDIT_FRAME::SyncLibraries().
|
private |
Definition at line 62 of file throttle.h.
Referenced by Ready(), and THROTTLE().
|
private |
Definition at line 63 of file throttle.h.
Referenced by Ready(), and THROTTLE().