()
| 44 | } |
| 45 | |
| 46 | start(): void { |
| 47 | this.load(); |
| 48 | |
| 49 | // Save the state on every interval |
| 50 | this.timer = setInterval(() => this.save(), SAVE_INTERVAL); |
| 51 | } |
| 52 | |
| 53 | stop(): void { |
| 54 | // ensure properly started, else this throws undesired errors (e.g. SIGINT during startup) |