Graphics 640,480,16,2
Global fpsrate,loops, fpstime
While Not KeyDown(1)
Color 255,255,255
Text 10, 10, fps()
Plot MouseX(),MouseY()
Flip
Cls
Wend
;---
Function fps()
loops = loops+1
If MilliSecs() - fpstime > 1000 Then
fpsrate = loops
loops = 0
fpstime = MilliSecs()
End If
Return fpsrate
End Function
|