| 214 | } |
| 215 | |
| 216 | void 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected