---
title: "Tracking Time Without Clock"
description: "Instead of threading a full virtualized Clock interface through every component, two lighter patterns often suffice for handling time in reliable systems."
url: "https://swe.quest/articles/tracking-time-without-clock-7964e27d177f0db1"
canonical: "https://tigerbeetle.com/blog/2025-10-21-clockless-time"
source: "TigerBeetle"
published: "2025-10-21"
difficulty: "medium"
kind: "Opinion"
reading_minutes: 2
tags: ["time-clocks","testing","zig","system-design"]
---

# Tracking Time Without Clock

A post on [TigerBeetle](https://swe.quest/sources/tigerbeetle.md), published 2025-10-21, 2 min read, Opinion. Original: [https://tigerbeetle.com/blog/2025-10-21-clockless-time](https://tigerbeetle.com/blog/2025-10-21-clockless-time)

## Summary

Instead of threading a full virtualized Clock interface through every component, two lighter patterns often suffice for handling time in reliable systems. Passing a \`now: Instant\` argument to methods (call-site dependency injection) lets components like TigerBeetle's adaptive replication routing measure durations without owning a clock, and makes edge cases like time overflow trivial to test. For scheduling future work, a \`tick\` method invoked at a fixed cadence by the caller gives coarse but sufficient time resolution and greatly simplifies control flow and testing.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Time & clocks](https://swe.quest/tags/time-clocks.md) (Distributed systems)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Zig](https://swe.quest/tags/zig.md) (Languages)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)

## Prerequisites

- dependency injection ([easy posts on Application security](https://swe.quest/tags/appsec.md?difficulty=easy))
- monotonic vs wall-clock time

## Keywords

TigerBeetle, Zig, adaptive replication routing

## Related posts

- [Building On-call: Time, timezones, and scheduling](https://swe.quest/articles/building-on-call-time-timezones-and-scheduling-f978980b35f41e6a.md): incident.io · 2024-07-18 · Medium · 11 min read · Time & clocks, Scheduling, Testing, PostgreSQL, Go
  incident.io's on-call scheduler computes who is on shift from rotations with working hours, round-robin handovers and overrides, and getting it right depends on being precise about local time, offsets, IANA timezones, instants and durations.
- [Three Clocks are Better than One](https://swe.quest/articles/three-clocks-are-better-than-one-10703f0b75ab21bf.md): TigerBeetle · 2021-08-30 · Medium · 5 min read · Time & clocks, Distributed systems, Linux
  TigerBeetle builds a fault-tolerant "cluster time" by measuring clock offsets to peers during keepalive probes.
- [Run Scheduled and Recurring Tasks with Cron](https://swe.quest/articles/run-scheduled-and-recurring-tasks-with-cron-ca49b6813f0599a8.md): Railway · 2025-11-26 · Medium · 10 min read · Scheduling, Deployment, PostgreSQL
  Cron runs commands on time-based schedules but keeps no job history, has no retries and does no concurrency control, so reliability depends on the job itself.
- [Building On-call: Continually testing with smoke tests](https://swe.quest/articles/building-on-call-continually-testing-with-smoke-tests-7d1cd2c2e1ed63ef.md): incident.io · 2024-08-09 · Medium · 7 min read · Testing, SRE, CI/CD, Resilience
  incident.io runs an end-to-end smoke test suite for its On-call paging product every minute against production and staging, and also on every pull request and deploy using containers on a single machine.
- [A Tale Of Four Fuzzers](https://swe.quest/articles/a-tale-of-four-fuzzers-88cabf77780814b8.md): TigerBeetle · 2025-11-28 · Hard · 32 min read · Testing, Replication, Distributed systems, Formal methods, Zig
  TigerBeetle's Adaptive Replication Routing (ARR) puts the primary in the middle of a replication ring so no single dropped message is critical.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
