I used signed var. But i think i know why it doesn't stop.
Let's say that i have 00:02. The procces will be the following:
00:02
00:01
00:00 and then when the sec1 is lower than 0 it exits the loop and automatically becomes 9, the sec2 becomes 5 and the min1 becomes 9 and in my main before i call this function i have while ( (min2 != 0) || (min1 != 0) || (sec2 != 0) || (sec1 != 0)), therefore the loop begins again. I will change the while loop in my main with an if statement and that should solve my problem.
- - - Updated - - -
It works now. Thank you for the support.