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

Method CallEvery

CobaltFusion/GuiExecutor.cpp:72–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72ScheduledCall GuiExecutor::CallEvery(const Duration& interval, std::function<void ()> fn)
73{
74 assert(interval > Duration::zero());
75
76 unsigned id = GetCallId();
77 auto at = std::chrono::steady_clock::now() + interval;
78 CallAsync([this, id, at, interval, fn]()
79 {
80 m_scheduledCalls.Insert(GuiExecutor::CallData(id, at, interval, fn));
81 ResetTimer();
82 });
83 return MakeScheduledCall(id);
84}
85
86void GuiExecutor::Cancel(const ScheduledCall& call)
87{

Callers

nothing calls this directly

Calls 2

CallDataClass · 0.85
InsertMethod · 0.45

Tested by

no test coverage detected