The sdk manual describes what they do here:
https://www.scirra.com/manual/23/runtime-functions
under "draw(ctx) and drawGL(glw)"
And it's the runtime that calls them. For more detail: in preview.js the runtime calls the layout draw function in layout.js whenever a frame is to be drawn. From the layout draw function each layer draw function is called (same file) and from there each instance's draw function is called.
You can't control when the plugin's draw functions are called but you don't have to draw anything when they are. It's quite doable to do as you mentioned to wait a time interval between draws by saving the current time and comparing against it every time the draw funtion is called. However it would only cause your object to flash one frame before the background and other objects would overdraw it after that until it flashes again.
Here's how you could do it.
1. add a variable to instanceProto.onCreate so you can save the current time.
this.oldTime = 0;
this.timeInterval = 1; //in seconds
2. add this to the top of your draw and drawgl functions:
var currentTime = this.runtime.kahanTime.sum;
if (currentTime >= this.timeInterval + this.oldTime)
this.oldTime = currentTime;
else
return;
// add drawing code below
But as I said you'd only get a passive flash of the object every interval.