all repos — website @ bb05e47f6022227c64aad94677f8da9ef8ae227c

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