in reply to time accumulater

Several problems: You should be checking >= 60, not > 60. Incrementing hours when the seconds total over 60 is not good, increment $tmin instead. And you do have to handle seconds overflow first, and then minutes, or you can be left with minutes of 60 or end up dropping an hour. I wouldn't bother with if blocks, just:
$tmin += $tsec >= 60; $tsec %= 60; $hrs += $tmin >= 60; $tmin %= 60;