all repos — website @ f97814c2cdc8d34d5816afe7ed81c841ead84998

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