On a jsp page, I declare a startTime variable and an endTime variable. The difference is then calculated and displayed in milliseconds.
.... say that equals 208 ms
if I want the date represented in seconds I can simply divide the total by 1000.
Problem is when it's below 1000 such as the example above the value returned for display is 0 sec.
Do I need to set the decimal point somewhere?
Code:
(endTime.getTime() - startTime.getTime())
if I want the date represented in seconds I can simply divide the total by 1000.
Problem is when it's below 1000 such as the example above the value returned for display is 0 sec.
Do I need to set the decimal point somewhere?
Comment