Skip to content

Glossary: System Design Basics in Java

Clock (injectable / fake clock)

Also written: fake clock, clock

A function that returns the current time; passing it as a parameter lets a test use a fake clock moved by hand instead of sleeping.

Where the book teaches it

Related terms

DoubleSupplierTTL (time to live)assert