Class cocos.custom_clocks.ScreenReaderClock_12dev

pyglet.clock._ClockBase --+    
                          |    
         pyglet.clock.Clock --+
                              |
                             ScreenReaderClock_12dev

Make frames happen every 1/framerate and takes screenshots

This class is compatible with pyglet 1.2dev, it is not compatible with pyglet 1.1.4release

Methods

  __init__(self, framerate, template, duration)
Initialise a Clock, with optional framerate limit and custom time function.
float update_time(self)
Additionally, take snapshots.
float get_sleep_time(self, sleep_idle)
sleep time between frames; 0.0 as as we want to run as fast as possible
Inherited from pyglet.clock.Clock: call_scheduled_functions, get_fps, get_fps_limit, schedule, schedule_interval, schedule_interval_soft, schedule_once, set_fps_limit, tick, unschedule Inherited from pyglet.clock._ClockBase: sleep

Constants

Inherited from pyglet.clock.Clock: MIN_SLEEP, SLEEP_UNDERSHOOT

Method Details

__init__

(Constructor) __init__(self, framerate, template, duration)
Initialise a Clock, with optional framerate limit and custom time function.
Overrides:
pyglet.clock.Clock.__init__

update_time

update_time(self)
Get the (fake) elapsed time since the last call to update_time
Additionally, take snapshots.
Returns:
float: The number of seconds since the last update_time, or 0 if this was the first time it was called.
Overrides:
pyglet.clock.Clock.update_time

Since: pyglet 1.2

get_sleep_time

get_sleep_time(self, sleep_idle)
sleep time between frames; 0.0 as as we want to run as fast as possible
Returns:
float: Time until the next scheduled event in seconds, or None if there is no event scheduled.
Overrides:
pyglet.clock.Clock.get_sleep_time

Since: pyglet 1.1