Im writing a 2D skiing game and want and accurate timer so
that i can hold the best times in a high score table,havent programmed in ages,just doing this project to get me back into programming.
I want the timer to record minutes,seconds,hundreths of seconds,heres the code i have:
The hundreths doesnt seem that accurate,anyone know of a better way of doing this?.
Thanks for the help.
that i can hold the best times in a high score table,havent programmed in ages,just doing this project to get me back into programming.
I want the timer to record minutes,seconds,hundreths of seconds,heres the code i have:
The hundreths doesnt seem that accurate,anyone know of a better way of doing this?.
Thanks for the help.
oldtime=MilliSecs() oldtime1=MilliSecs() mins=0 seconds=0 hundreths=0 SetBuffer BackBuffer() Repeat Cls If MilliSecs()>oldtime1+10 Then hundreths=hundreths+1:oldtime1=MilliSecs() If MilliSecs()>oldtime+1000 Then seconds=seconds+1:oldtime=MilliSecs() If seconds=60 Then seconds=0:mins=mins+1 Locate 10,10 Print "TIME 0"+mins+":"+seconds+":"+hundreths If hundreths>99 Then hundreths=1 Flip Until False