expyriment.misc.Clock

class expyriment.misc.Clock(sync_clock=None)

Basic timing class.

Unit of time is milliseconds.

Methods

__init__(sync_clock=None)

Create a clock.

Parameters :

sync_clock : misc.Clock, optional

synchronise clock with existing one

cpu_time

Getter for CPU time.

init_localtime

Getter for init time in local time

init_time

Getter for init time in milliseconds.

static monotonic_time()

Returns the time of the high-resolution monitonoic timer that is used by Expyriment interally.

reset_stopwatch()

“Reset the stopwatch.

The use of the stopwatch does not affect the clock time.

stopwatch_time

Getter for time in milliseconds since last reset_stopwatch.

The use of the stopwatch does not affect the clock time.

time

Getter for current time in milliseconds since clock init.

wait(waiting_time, function=None)

Wait for a certain amout of milliseconds.

Parameters :

waiting_time : int

time to wait in milliseconds

function : function, optional

function to repeatedly execute during waiting loop

wait_minutes(time_minutes, function=None)

Wait for a certain amount of minutes (see also wait() ).

Parameters :

time_minutes : int

time to wait in minutes

function : function, optional

function to repeatedly execute during waiting loop

wait_seconds(time_sec, function=None)

Wait for a certain amout of seconds (see also wait() ).

Parameters :

time_sec : int

time to wait in seconds

function : function, optional

function to repeatedly execute during waiting loop

Previous topic

expyriment.misc.ByteBuffer

Next topic

expyriment.stimuli

This Page