View Single Post
Old 25 April 2021, 16:26   #4
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,427
You can use such a method to time, but it works best if you synchronise it to a specific position on the raster so that the bars always start at the same point. Obviously, if you have to specifically wait for that position that can slow down your code (unless it already syncs to a frame). As such, it can be a good idea to only add such waiting code while trying to optimise things or figure out how long they take.

Anyway, the idea would be to do something like VWAIT 150, then call your procedures.

Now, if your game is already synchronised to the screen refresh rate then the flashing simply means it runs slower than one full frame, which makes this way of reading performance a bit tricky. What you could then do is something like get the current time, call the procedure 1000x and get the time after that. Then divide the result by 1000 to get the time per call.
roondar is offline  
 
Page generated in 0.07999 seconds with 11 queries