Trees | Indices | Toggle frames |
---|
pyglet.clock._ClockBase --+ | pyglet.clock.Clock --+ | AutotestClock
Make frames follow a test plan
This class is compatible with pyglet 1.1.4release, it is not compatible with pyglet 1.2dev
__init__(self,
screen_sampler)
Initialise a Clock, with optional framerate limit and custom
time function.
|
|
float |
tick(self,
poll=False)
Signify that one frame has passed.
|
float |
get_sleep_time(self,
sleep_idle)
Get the time until the next item is scheduled.
|
Inherited from pyglet.clock.Clock :
call_scheduled_functions ,
get_fps ,
get_fps_limit ,
schedule ,
schedule_interval ,
schedule_interval_soft ,
schedule_once ,
set_fps_limit ,
unschedule ,
update_time
Inherited from pyglet.clock._ClockBase :
sleep
|
Inherited from pyglet.clock.Clock :
MIN_SLEEP ,
SLEEP_UNDERSHOOT
|
Signify that one frame has passed.
This will call any scheduled functions that have elapsed.
Get the time until the next item is scheduled.
This method considers all scheduled items and the current fps_limit, if any.
Applications can choose to continue receiving updates at the maximum framerate during idle time (when no functions are scheduled), or they can sleep through their idle time and allow the CPU to switch to other processes or run in low-power mode.
If sleep_idle
is True the latter behaviour is selected, and
None will be returned if there are no scheduled items.
Otherwise, if sleep_idle
is False, a sleep time allowing
the maximum possible framerate (considering fps_limit) will
be returned; or an earlier time if a scheduled function is ready.
Since: pyglet 1.1
Trees | Indices | Toggle frames |
---|
Generated by Epydoc 3.0beta1 on Sun Aug 12 20:39:19 2012 | http://epydoc.sourceforge.net |