Date and Time Difference in Java


Though I have been a programmer for 17 years I have never quite got the hang of date/time calculation in any of the programming language I know (I can assure you there are quite a few). Recently I needed to calculate the time elapsed since a thread was started and here is what I came up with first:

comments powered by Disqus