I wan to find the time difference between Current time and the Previous time.
In my project i maintain some time interval and that interval is checked by converting the both previous and current time to entire seconds and find the difference.
The difference is checked with the interval in the program.
I have written the program to find the difference but for example let me say my previous time - 23:59:30 and the current time is - 00:00:54 then when i try to find the difference like, time = current time - previous time i get some wrong value due to overflow.
Bcos the each second the previous and current time is converted to total seconds and its difference is only checked.
can any suggest me how this can be rectifed?