This is more of a maths problem than a java problem basically.
The result you receive is correct. This because 225 seconds is 3 minutes (when doing an integral division). What you want is the this:
- divide by 1000 to get the number of seconds -> rest is milliseconds
- divide that by 60 to get number of minutes -> rest are seconds
- divide that by 60 to get number of hours -> rest are minutes
or in java:
int millis = diff % 1000;
diff/=1000;
int seconds = diff % 60;
diff/=60;
int minutes = diff % 60;
diff/=60;
hours = diff;