MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / Throttle

Method Throttle

CobaltFusion/Throttle.cpp:18–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16using namespace std::chrono_literals;
17
18Throttle::Throttle(IExecutor& executor, int callsPerSecond, std::function<void()> fn) :
19 m_delta(std::chrono::milliseconds(1000/callsPerSecond)),
20 m_callPending(false),
21 m_fn(fn),
22 m_executor(executor)
23{
24}
25
26void Throttle::operator()()
27{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected