![]() |
Blue Brain BioExplorer
|
#include <Throttle.h>
Public Types | |
using | Function = std::function< void()> |
Public Member Functions | |
void | operator() (const Function &fn, const int64_t wait=100) |
void | operator() (const Function &fn, const Function &later, const int64_t wait=100) |
Executes the given function at most once every 'wait' milliseconds.
Inspired by https://remysharp.com/2010/07/21/throttling-function-calls.
Definition at line 33 of file Throttle.h.
using core::Throttle::Function = std::function<void()> |
Definition at line 35 of file Throttle.h.
void core::Throttle::operator() | ( | const Function & | fn, |
const Function & | later, | ||
const int64_t | wait = 100 |
||
) |
Definition at line 44 of file Throttle.cpp.
void core::Throttle::operator() | ( | const Function & | fn, |
const int64_t | wait = 100 |
||
) |
Definition at line 39 of file Throttle.cpp.