Jesper Young wrote:If you divide that by 60 * 1000 you get a value in minutes.
Ah, but Nimo doesn't divide by 60 * 1000.
This will first calculate endTime.getTime() - startTime.getTime(); the difference in milliseconds. This is then divided by 60; the difference in milliminutes. That is then multiplied by 1000. Remember, / and * have the same operator precedence, and are therefore evaluated from left to right.
To calculate the difference in minutes the following are two options:
(first divide by 60, then divide by 1000)
(really divide by 60 * 1000 by ensuring it is evaluated before the division)