|Home||Documentation||Demos||Status||Contact Info||Project Page|
The Timing class is used to keep a consistent frame rate. It accepts a FPS and a function to be used as a "main loop". Then upon starting, this function will be called to accomplish the FPS requested. If the function takes longer to run than the calculated interval, then the function is executed straight away.
NOTE: The Timing class doesn't use anything specific to Opera/Wii. So, it's inclusion in a non-Internet Channel script won't pose a problem.
Returns a Timing object.
Parameters is an integer which is the frames per second to attempt to accomplish.
Parameters is an function name.
Calculates the time between now and when the next iteration should be and sets a Timeout. So, to start interating, timer.time() and such should be found at the end of the mainloop function as well.
Stops the iteration of the mainloop.