wall clock

The computer's real current time, which keeps moving while a program or test runs.

In more detail

Wall clocks can be adjusted, so measuring durations with them can give wrong or even negative results. Use a monotonic clock for elapsed time and the wall clock for timestamps people read.

Examples

Go: time.Since uses the monotonic clock automatically
In this course: Code that reads the wall clock directly has a hidden input. A test that asserts on it, such as expecting the seconds to be zero, fails almost every time.

Related terms

Taught in

References