Graphics3D(854,480,32,2)
Global MilliValue% = MilliSecs()
Global MainLoopTimer = CreateTimer(30)
Main()
End()
Function Main()
Repeat
If( KeyHit(28)=1 )
MilliValue = MilliSecs()
EndIf
SetBuffer(BackBuffer())
ClsColor(000,000,000) : Cls()
Color(255,255,255)
TStr$ = MilliValue : CText(TStr,GraphicsWidth()/2-StringWidth(TStr)/2,0)
;Flip(1)
WaitTimer(MainLoopTimer)
VWait():Flip(False)
Until( KeyDown(1)=1 )
End Function
Function CText(TextStr$,PX%,PY%)
Text(PX,PY,TextStr,False,False)
End Function
Works okay on my Windows 10 machine
Graphics3D(854,480,32,2)
Global MilliValue% = (MilliSecs() And $7FFFFFFF) / 1000
Global MainLoopTimer = CreateTimer(30)
Main()
End()
Function Main()
Repeat
If( KeyHit(28)=1 )
MilliValue = (MilliSecs() And $7FFFFFFF) / 1000
EndIf
SetBuffer(BackBuffer())
ClsColor(000,000,000) : Cls()
Color(255,255,255)
TStr$ = MilliValue : CText(TStr,GraphicsWidth()/2-StringWidth(TStr)/2,0)
;Flip(1)
WaitTimer(MainLoopTimer)
VWait():Flip(False)
Until( KeyDown(1)=1 )
End Function
Function CText(TextStr$,PX%,PY%)
Text(PX,PY,TextStr,False,False)
End Function
This should count up by 1 second intervals. Let it run for about 10 seconds, then press enter to see if the timer has advanced 10 seconds or not. Try 30 or a minute. Is it keeping correct time?