timeflux.helpers.clock


Time and rate helpers

clock

timeflux.helpers.clock.now()[source]

Return the current time as np.datetime64[‘us’].

timeflux.helpers.clock.float_to_time(timestamp)[source]

Convert a np.float64 to a np.datetime64[‘us’].

timeflux.helpers.clock.float_index_to_time_index(df)[source]

Convert a dataframe float indices to datetime64[‘us’] indices.

timeflux.helpers.clock.time_to_float(timestamp)[source]

Convert a np.datetime64[‘us’] to a np.float64.

timeflux.helpers.clock.min_time(unit='ns')[source]

Return the minimum datetime for this platform.

timeflux.helpers.clock.max_time(unit='ns')[source]

Return the maximum datetime for this platform.

timeflux.helpers.clock.effective_rate(df)[source]

A simple method to compute the effective rate.

timeflux.helpers.clock.absolute_offset()[source]

Return the offset between the UTC timestamp and a precision timer such as the LSL precision clock.

timeflux.helpers.clock.time_range(start, stop, num)[source]

Return num evenly spaced timestamps between start and stop (np.datetime64).