new seconds = SOME_VALUE, minutes, hours, days;while(seconds > 59){ seconds -= 60; minutes++;}while(minutes > 59){ minutes -= 60; hours++;}while(hours > 23){ hours -= 24; days++;}