How to format an elapsed time interval in hh:mm:ss.SSS format in Java?
Support for what you want to do is built in to the latest JDKs with a little known class called TimeUnit. What you want to use is java.util.concurrent.TimeUnit to work with intervals. SimpleDateFormat does just what it sounds like it does, it formats instances of java.util.Date, or in your case it converts the long value … Read more