stimuli.time.Clock🔗

class stimuli.time.Clock[source]🔗

Clock which keeps track of time in nanoseconds.

The origin t=0 corresponds to the instantiation of the stimuli.time.Clock object. The time is measured either through the monotonic time.monotonic_ns() function or through the performance counter time.perf_counter() function, depending on which one has the highest resolution.

Methods

get_time()

Return the current time in seconds.

get_time_ms()

Return the current time in milliseconds.

get_time_ns()

Return the current time in nanoseconds.

get_time_us()

Return the current time in microseconds.

get_time()[source]🔗

Return the current time in seconds.

Returns:
timefloat

The current time in seconds.

get_time_ms()[source]🔗

Return the current time in milliseconds.

Returns:
timefloat

The current time in milliseconds.

get_time_ns()[source]🔗

Return the current time in nanoseconds.

Returns:
timeint

The current time in nanoseconds.

get_time_us()[source]🔗

Return the current time in microseconds.

Returns:
timefloat

The current time in microseconds.