Skip to content

Time

def rerun.set_time_sequence(timeline, sequence)

Set the current time for this thread as an integer sequence.

Used for all subsequent logging on the same thread, until the next call to set_time_sequence.

For example: set_time_sequence("frame_nr", frame_nr).

You can remove a timeline again using set_time_sequence("frame_nr", None).

There is no requirement of monotonicity. You can move the time backwards if you like.

Parameters:

Name Type Description Default
timeline str

The name of the timeline to set the time for.

required
sequence int

The current time on the timeline in integer units.

required

def rerun.set_time_seconds(timeline, seconds)

Set the current time for this thread in seconds.

Used for all subsequent logging on the same thread, until the next call to rerun.set_time_seconds or rerun.set_time_nanos.

For example: set_time_seconds("capture_time", seconds_since_unix_epoch).

You can remove a timeline again using set_time_seconds("capture_time", None).

Very large values will automatically be interpreted as seconds since unix epoch (1970-01-01). Small values (less than a few years) will be interpreted as relative some unknown point in time, and will be shown as e.g. +3.132s.

The bindings has a built-in time which is log_time, and is logged as seconds since unix epoch.

There is no requirement of monotonicity. You can move the time backwards if you like.

Parameters:

Name Type Description Default
timeline str

The name of the timeline to set the time for.

required
seconds float

The current time on the timeline in seconds.

required

def rerun.set_time_nanos(timeline, nanos)

Set the current time for this thread.

Used for all subsequent logging on the same thread, until the next call to rerun.set_time_nanos or rerun.set_time_seconds.

For example: set_time_nanos("capture_time", nanos_since_unix_epoch).

You can remove a timeline again using set_time_nanos("capture_time", None).

Very large values will automatically be interpreted as nanoseconds since unix epoch (1970-01-01). Small values (less than a few years) will be interpreted as relative some unknown point in time, and will be shown as e.g. +3.132s.

The bindings has a built-in time which is log_time, and is logged as nanos since unix epoch.

There is no requirement of monotonicity. You can move the time backwards if you like.

Parameters:

Name Type Description Default
timeline str

The name of the timeline to set the time for.

required
nanos int

The current time on the timeline in nanoseconds.

required