Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim time as New Stopwatch
- time.start()
- Private Sub FrameThread
- Dim lastframe As Double
- Dim currenttime As Double
- Dim FramePerMS As Double
- Do
- CheckForIllegalCrossThreadCalls = False
- currenttime = time.ElapsedMilliseconds
- FramePerMS = currenttime - lastframe
- If FramePerMS >= REFRESHRATE Then
- lastframe = currenttime
- DrawFPS(currenttime, FramePerMS)
- BlackFrame()
- ClearFrame()
- Else
- Me.Refresh()
- Threading.Thread.Sleep(1)
- End If
- Loop
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement