Quote:
Originally Posted by Sanjay Singh
I want to print in hrs and min if it crossed 60mins.
According this code it will print hours but min will keep increasing.
|
Use the following code for calculating hours, minutes, and seconds:
Code:
iSeconds = 12345 // your time source in seconds
iHours = iSeconds / 3600
iMinutes = iSeconds % 3600 / 60
iSeconds = iSeconds % 60
Quote:
Originally Posted by Natsheh
When dividing an odd number always use floats AKA double variables then round the number to get an integer.
|
Uh . . no. In this case, we are not trying to get fractional values.
__________________