There are 2 ways. You could make a timer that had the time as its own specific dependent variable and was a piecewise function.
This would be saying
T = -x(in S delay, if possible) + Z(how much time you want to start with).
I am rusty on my algebra, but if I figure right you just have it print only T values that are elements of the whole numbers. Make a code saying T would not print below 0. Also, if you can code delay in seconds instead of milliseconds, you could also code so that T = -X + Z where X is automatically rounded down to the nearest integer value.
Or if you want it simple, you can just hand draw frames and have it delay however many seconds(or 1000 miliseconds) until you want it to change to the next number.
|