MCPcopy Create free account
hub / github.com/MJx0/KittyMemoryEx / poll

Method poll

KittyMemoryEx/KittyPerfEvent.cpp:216–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216void KittyPerfWatch::poll(int timeout_ms, const std::function<bool(const KittyPerfSample &)> &cb)
217{
218 if (!cb || !enable())
219 return;
220
221 while (true)
222 {
223 KittyPerfSample out{};
224 pollOnce(timeout_ms, &out);
225 if (cb(out))
226 break;
227 }
228
229 disable();
230}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected