Just realised something I feel pretty stupid about not seeing earlier:

The clock in Doc Scratch’s apartment tracks whether people live or die. It also acts as a portal…

…to a server in the Furthest Ring, which runs ~ATH code on it.

The ~ATH programming language is able to tell when something dies because it runs on the very same network as the clock that tells when something dies.