MCPcopy Create free account
hub / github.com/Tracktion/choc / setTimeout

Function setTimeout

choc/gui/choc_MessageLoop.h:543–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541
542template <typename Callback>
543void setTimeout (uint32_t intervalMillisecs, Callback&& callback)
544{
545 auto t = new Timer();
546
547 *t = Timer (intervalMillisecs, [t, c = std::move (callback)]
548 {
549 c();
550 postMessage ([t] { delete t; });
551 return false;
552 });
553}
554
555inline void Timer::clear() { pimpl.reset(); }
556

Callers

nothing calls this directly

Calls 2

TimerClass · 0.85
postMessageFunction · 0.85

Tested by

no test coverage detected