peahead
April 6th, 2010, 03:16 PM
I am using a timer routine which I obtained from the net. This is the code:
long start = System.currentTimeMillis();
textAreaGameInfo.append(strBuf.toString());
long elapsed = System.currentTimeMillis() - start;
How can I force the correct display of time as follows:
If 0 seconds or less it should show 0.142 milliseconds
If 0 seconds or greater it should show 1.42 seconds
If 1 minute or greater it should show 1min 42 seconds
Thanks
long start = System.currentTimeMillis();
textAreaGameInfo.append(strBuf.toString());
long elapsed = System.currentTimeMillis() - start;
How can I force the correct display of time as follows:
If 0 seconds or less it should show 0.142 milliseconds
If 0 seconds or greater it should show 1.42 seconds
If 1 minute or greater it should show 1min 42 seconds
Thanks