I recently wrote a program to calculate the time it takes to download a file with a 56k modem. The program looks ok but I would like to refine it so that it gives me the exact time as opposed to a 'rounded off' time.
The program is below:
For example, the time it takes to download a 50MB file is 2hrs 44 mins & 6 seconds. Unfortunately the program I wrote prints out the following:
What is the best way to refine this program so that it gives me the EXACT time instead of 'rounded' numbers?
BTW....I used the "setMaximumFractionDigits()" method in the NumberFormat class but it actually increased the hour by 1. What am I doing wrong? Please help.
Thanks in advance.........
[ September 17, 2008: Message edited by: Derek Harper ] [ September 17, 2008: Message edited by: Derek Harper ]