| 541 | |
| 542 | template <typename Callback> |
| 543 | void 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 | |
| 555 | inline void Timer::clear() { pimpl.reset(); } |
| 556 |
nothing calls this directly
no test coverage detected