about summary refs log tree commit diff stats
path: root/src/sleep.ts
blob: 663d4723ba31393201b64bc397780468d6345940 (plain)
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);
}