Your MSPerFrame is inaccurate, this will cause under and over compensation from time to time. Also printing to the IDE will cause unpredictible slowdowns.
Change the code to
Change the code to
Local FPS# = 85.0 'target FPS - Note how we are using a floating point number and not an Int Local MSPerFrame# = 1000.0/FPS ' - Again a float, not an Int