~/talk

Dealing with Time and Clocks in Code

Talkat JFuture 2019 · 2019-11-14..11-16· [web-platform]
links:none on file
slides:none on file

Hardware clocks like a cheap Adafruit RTC typically drift ~5 seconds/month, VMs can be swapped out so their clocks jump, and network offsets create system precisions of seconds so ordering is imperfect — a token can appear generated 278 ms in the future and be rejected. Use NTP to regain millisecond accuracy, store timestamps as UTC and format with ISO 8601, avoid custom time math, and accept that distributed time is fuzzy rather than trying to build a perfect clock.

AI-written summary · about

  1. 0:00Introduction and speaker background
  2. 1:52Time problems in distributed systems
  3. 3:16Hardware clock drift and precision
  4. 7:10Why server clocks drift
  5. 9:40NTP and time synchronization
  6. 13:14Debugging the token timestamp bug
  7. 14:43Human vs. machine time precision
  8. 16:37ISO 8601 timestamps
  9. 18:24Time zones are for humans
  10. 23:25Leap years and timestamp bugs
  11. 25:13Don’t code with time yourself
  12. 26:18Use UTC everywhere
  13. 29:12Summary and key takeaways
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.