1 2 3 4 5 6 7 8
let sleepTimeout: Timer; export function keepAwake() { if (sleepTimeout) clearTimeout(sleepTimeout); sleepTimeout = setTimeout(function () { process.exit(0); }, 300_000); }