If I have a plugin that draws an object to the screen with every tick, I want there to be a way to delay the drawing by a configurable item.
So if I want it to draw l only every 1 second, there would be a 1000 millisecond variable I'd set or something similar.
It has to be done in the plugin and not through Waits in C2.
It seems from my research that by design the JS for plugins is ran every draw just like anything else in C2.
I'm looking for best practices around this. I'm looking to extend some WebGL enabled stuff as well, so any advice is appreciated as this is not my normal territory.
I've tried adding a sleep function or a function that checks for if the current clock time is 1 second later than when it ran last. Seems not to work right. Maybe I'm not looking at the right functions.