()
| 56 | } |
| 57 | |
| 58 | const start = () => { |
| 59 | if (sampling || win.isDestroyed() || win.webContents.isDestroyed() || win.webContents.isDevToolsOpened()) return |
| 60 | sampling = true |
| 61 | samples.clear() |
| 62 | schedule() |
| 63 | stopTimer = setTimeout(stopAndFlush, samplePeriod) |
| 64 | } |
| 65 | |
| 66 | win.on("closed", stopAndFlush) |
| 67 |