# A Deterministic VM Clocks Time by Counting Branches, Not Instructions

Original title: A Clock Made of Branches

> Hacker News story 50345195 · language: en · submitted 2026-11-02
> Web version: https://zeli.app/story/50345195
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 7 · by [setheron](<https://news.ycombinator.com/user?id=setheron>) · 💬 1
[original](<https://fzakaria.com/2026/11/01/a-clock-made-of-branches>) · [HN discussion](<https://news.ycombinator.com/item?id=50345195>)

## Summary

Building Rewind, a deterministic VM, means deciding what time is inside a replayed machine. Host wall-clock time is useless because it depends on external load. Counting retired instructions seems natural, but interrupts and page faults skew the count by thousands. The conditional branch counter, however, stays perfectly stable across runs. Rewind now advances its clock one nanosecond per branch, a better approximation of real time than treating computation as free.

## Key quote

> Some say time is an illusion. I say it's a `jnz` counter.

---

## Cite

- Page: https://zeli.app/story/50345195
- Date: 2026-11-02
- Source: fzakaria.com (https://fzakaria.com/2026/11/01/a-clock-made-of-branches)
- Hacker News: https://news.ycombinator.com/item?id=50345195

## Other languages

- zh: https://zeli.app/zh/story/50345195 · markdown: https://zeli.app/zh/story/50345195.md
- ja: https://zeli.app/ja/story/50345195 · markdown: https://zeli.app/ja/story/50345195.md
- ko: https://zeli.app/ko/story/50345195 · markdown: https://zeli.app/ko/story/50345195.md
- de: https://zeli.app/de/story/50345195 · markdown: https://zeli.app/de/story/50345195.md
- es: https://zeli.app/es/story/50345195 · markdown: https://zeli.app/es/story/50345195.md
- ru: https://zeli.app/ru/story/50345195 · markdown: https://zeli.app/ru/story/50345195.md
