all repos — website @ 8beec515146fc8cc323d9de722a405372801e1df

My website

src/sleep.ts (view raw)

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);
}