OpenGLContext.events.internaltime
index
/home/mcfletch/pylive/OpenGLContext/events/internaltime.py

Track a (potentially scaled) time with respect to an external time

 
Modules
       
OpenGLContext.events.event

 
Classes
       
object
InternalTime

 
class InternalTime(object)
    Track an internal time.
 
Internal times allow for fractional and absolute reporting
of a current time with a given duration. The internal time
potentially has a transformation applied to the incoming time
values, which allows for time reversal, slowdown and speed up.
 
  Methods defined here:
__init__(self, duration=1.0, repeating=0, multiplier=1.0, current=None, currentCount=None, discreteOnly=0)
Initialise (but don't start) the timer
 
duration -- length in seconds (float) for a single cycle
repeating -- if 1, will not stop when hit duration, but will repeat forever
    elif positive count > 1, will repeat X times duration
multiplier -- the time multiplier
    1.0 -> real-time, .1 -> slow-mo, -1.0 -> rewind
current -- current internal time, lets you start at other than 0 seconds
    use resume to do the restarting
currentCount -- the current count for repeats, lets you start partway
    through the set
discreteOnly -- suppress the generation of fractional events...
__repr__(self)
getCurrent(self)
Get current internal time
 
You could pass this to another internal time
that's dependent on this time as "realTime"
getExternal(self)
Get the last "external" time passed to the timer
getFraction(self)
Get current internal time as fraction of duration.
pause(self, realTime)
Pause the timer, use resume to continue
 
Note: does not create a FractionalEvent
poll(self, realTime)
Called by system/clients to determine if there are any waiting events
resume(self, realTime)
Continue a paused timer
 
Note: does not create a FractionalEvent
start(self, realTime)
Start the timer from 0 for forward multipliers, duration for reverse multipliers
stop(self, realTime)
Stop this cycle (reset current fraction)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Data
        __file__ = '/home/mcfletch/pylive/OpenGLContext/events/internaltime.pyc'
__name__ = 'OpenGLContext.events.internaltime'
__package__ = 'OpenGLContext.events'