Oh so a couple things.
You don't want to floor that, or it will defeat the purpose of dt, which gives you fractions of seconds. If you floor it, it will go to the next lower whole number no matter what framerate you're running at. Use an intermediate variable to keep track of the actual time, and only floor the displayed time.
Resetting to 10 when you get to 8 is something else entirely, so you're going to have to look elsewhere.