Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. Dim time as New Stopwatch
  2. time.start()
  3.  
  4. Private Sub FrameThread
  5. Dim lastframe As Double
  6. Dim currenttime As Double
  7. Dim FramePerMS As Double
  8. Do
  9. CheckForIllegalCrossThreadCalls = False
  10. currenttime = time.ElapsedMilliseconds
  11. FramePerMS = currenttime - lastframe
  12. If FramePerMS >= REFRESHRATE Then
  13. lastframe = currenttime
  14. DrawFPS(currenttime, FramePerMS)
  15. BlackFrame()
  16. ClearFrame()
  17. Else
  18. Me.Refresh()
  19. Threading.Thread.Sleep(1)
  20. End If
  21. Loop
  22. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement