Re: how do you display time correctly using System.currentTimeMillis();

Originally Posted by
peahead
If 0 seconds or less it should show 0.142 milliseconds
You won't get thousandths of a millisecond from System.currentTimeMillis() 
Once you get your units/decimal places sorted out, you can use SimpleDateFormat.
Computer Science is a science of abstraction -creating the right model for a problem and devising the appropriate mechanizable techniques to solve it...
A. Aho and J. Ullman
Please use [CODE]...your code here...[/CODE] tags when posting code. If you get an error, please post the full error message and stack trace, if present.