Define hours, minutes, and seconds as follows:
int hours = (int) (time / 3600); int minutes = ((int) (time / 60)) % 60; int seconds = time % 60;
Alternatively, you can define minutes like this if you know the clock:
int minutes = (int) ((time - hours * 3600) / 60));
The nail
source share