Package psychopy :: Module core :: Class Clock
[frames] | no frames]

Class Clock

source code

A convenient class to keep track of time in your experiments. You can have as many independent clocks as you like (e.g. one to time responses, one to keep track of stimuli...) The clock is based on python.time.time() which is a sub-millisec timer on most machines. i.e. the times reported will be more accurate than you need!
Instance Methods
 
__init__(self) source code
 
getTime(self)
Returns the current time on this clock in secs (sub-ms precision)
source code
 
reset(self, newT=0.0)
Reset the time on the clock.
source code
Method Details

reset(self, newT=0.0)

source code 
Reset the time on the clock. With no args time will be set to zero. If a float is received this will be the new time on the clock