all repos — website @ 158681f4edd81d558024636dfe2bf0f03366c667

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);
  }, 300_000);
}