Friday, December 28, 2018

java - How to measure time elapsed, immune to system time server automatic updates

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?

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...