2

My servers and desktops are configured to automatically adjust their time via network ntp time servers.

This means that if I use the easy method beginDate.getTime()-new Date().getTime(), there is a chance I'm not getting an accurate number of elapsed milliseconds.

How can I write code that is immune to system clock updates and leap second adjustments?

Ole V.V.
  • 81,772
  • 15
  • 137
  • 161
Andrew Parks
  • 6,358
  • 2
  • 12
  • 27

0 Answers0