Advertisement
Guest User

Untitled

a guest
Sep 8th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. SuperStrict
  3.  
  4. Framework brl.blitz
  5. Import brl.standardio
  6. Import brl.glmax2d
  7.  
  8. Graphics(800, 600, 0)
  9.  
  10. While AppTerminate() = False And KeyHit(KEY_ESCAPE) = False
  11.     Cls()
  12.     DrawRect(MouseX() - 32, MouseY() - 32, 64, 64)
  13.     DrawText("FPS: " + GetFPS(), 0, 0)
  14.     Flip()
  15. End While
  16.  
  17. Function GetFPS:Int()
  18.     Global frame:Int, time:Int, fps:Int
  19.     frame:+ 1
  20.     If MilliSecs() > time
  21.         time = MilliSecs() + 1000 ' 1 second
  22.         fps = frame
  23.         frame = 0
  24.     End If
  25.     Return fps
  26. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement