About this question

Watchdog Timer

Easy · architecture & logic · Quant Developer interview question · systems, latency, monitoring, c++

Low-latency trading systems rely on continuous connectivity monitoring to prevent the execution of stale orders based on outdated market data. A watchdog timer acts as a critical fail-safe mechanism by tracking heartbeat signals to detect system hangs and triggering safety switches to mitigate financial risk. Task Implement a Watchdog class that monitors system health by processing a stream of heartbeat and status check events. The system initializes with a virtual heartbeat at time t=0. Given