Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

docs(watchdog): state the bound on forgiven sleep time

AdityaUmaleda0309f6c555
diff --git a/server/turn-watchdog.ts b/server/turn-watchdog.ts
index 8261af30c2..e0d31cb6e7 100644
--- a/server/turn-watchdog.ts
+++ b/server/turn-watchdog.ts
@@ -120,7 +120,11 @@ export class TurnWatchdog {
return false;
}
- /** sleptMs: time the process was suspended since the last sweep; it is forgiven, not counted as silence. */
+ /**
+ * sleptMs: the real time since the last sweep when the process was suspended; it is forgiven, not counted as silence.
+ * It may include up to one checkMs of awake time, so a stall after a sleep is caught up to one checkMs late, the
+ * same lag a sweep already has; never early.
+ */
sweep(sleptMs = 0): void {
const at = this.now();
for (const turn of this.turns.values()) {