Comment

Comment by calanya

That the clock always moves forward.

As one example, some clocks are cpu specific (rather than system specific). When a thread gets scheduled to a different cpu, it might be talking to a different clock, and getting a backwards time.

The user might also be changing the clock while the program is running, of course.

If the forward direction of time is important, make sure the the source of time is a monotonic clock API.

parent calanya 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton