One option:
Use an incremental coutner variable, and do something like this:
That way the 'do stuff' portion only gets invoked every 10th loop.
You could also create a timer, and if the timer gets triggered invoke your function.
Use an incremental coutner variable, and do something like this:
while not keydown(key_escape) if variable mod 10 = 0 then variable=1 ' Do your stuff end if variable = variable +1 flip wend
That way the 'do stuff' portion only gets invoked every 10th loop.
You could also create a timer, and if the timer gets triggered invoke your function.