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

Method CallEvery

CobaltFusion/Executor.cpp:208–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208ScheduledCall TimedExecutor::CallEvery(const Duration& interval, std::function<void ()> fn)
209{
210 assert(interval > Duration::zero());
211
212 unsigned id = GetCallId();
213 Add([this, id, interval, fn]()
214 {
215 m_scheduledCalls.Insert(TimedExecutor::CallData(id, std::chrono::steady_clock::now() + interval, interval, fn));
216 });
217 return MakeScheduledCall(id);
218}
219
220void TimedExecutor::Cancel(const ScheduledCall& call)
221{

Callers

nothing calls this directly

Calls 2

CallDataClass · 0.85
InsertMethod · 0.45

Tested by

no test coverage detected