Skip to content

Glossary: System Design Basics

Clock (injectable clock / fake clock)

Also written: fake clock, clock, time.monotonic, monotonic clock

A function that returns the current time, passed in as a parameter so tests can use a fake clock moved by hand instead of waiting. The default `time.monotonic` counts seconds from a fixed point and never jumps backward, unlike `time.time`.

Where the book teaches it

Related terms

TTL (time to live)