about summary refs log tree commit diff stats
path: root/src/sleep.ts
blob: 94d7547f771703506a46ae8cc0956b4c5100ec18 (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);
  }, 60_000);
}