Ok, it's time to synchronize our clocks...
summary
Explains why System.currentTimeMillis and System.nanoTime use different OS clocks, shows Linux clocks like CLOCK_MONOTONIC vs CLOCK_REALTIME, and demonstrates that reading time can dominate benchmarks on faulty hardware; cites a Lenovo example and a flamegraph showing half the time spent in time reads. Covers NTP behavior and measured resolution (~50–100 ms with chrony/ntpd), leap seconds and Google-style TrueTime interval guarantees, and alternatives: GPS/atomic clocks and logical / hybrid logical clocks.
AI-written summary · about
chapters (12)
- 0:00Introduction and speaker welcome
- 1:09Why time is harder than it seems
- 4:02Hardware clocks and CPU counters
- 7:39Nanosecond time and clock sources
- 9:34Real time vs monotonic clocks
- 12:47Sleep and scheduling with clocks
- 15:28Leap seconds and time definitions
- 17:30NTP and time synchronization
- 20:35Distributed system time issues
- 23:50Clock synchronization algorithms
- 26:12High-frequency trading clocks
- 28:55Summary and key takeaways
related talks
35mNobody Knows What Time It Is
48mAlright, Time to Synchronize Our Watches...
14mLightning Talk: Beyond NTP: High-accuracy clocks for distributed observability
28mRock around the clock (synchronization
17mGraham: Synchronizing Clocks by Leveraging Local Clock Properties
47mAdventures in Spacetime
27mDistributed Systems, Like It or Not
35mOpening the Box: Diagnosing Operating-System Task-Scheduler...
