---
title: Events and Timelines
order: 500
description: Events, timelines, and how Rerun tracks time
---

## Timelines

Each piece of logged data is associated with one or more timelines.

The logging SDK can automatically create two timelines for you:
* `log_time` - a temporal timeline with the time of the log call. Enabled by default; opt-out via the `RERUN_LOG_TIME` environment variable or `set_log_time_enabled`.
* `log_tick` - a sequence timeline with the sequence number of the log call. Disabled by default; opt-in via the `RERUN_LOG_TICK` environment variable or `set_log_tick_enabled`.

You can use the `set_time` function (Python reference: [set_time](https://ref.rerun.io/docs/python/stable/common/logging_functions/#rerun.set_time)) to associate logs with other timestamps on other timelines. For example:

```python
for frame in read_sensor_frames():
    rr.set_time("frame_idx", sequence=frame.idx)
    rr.set_time("sensor_time", timestamp=frame.timestamp)

    rr.log("sensor/points", rr.Points3D(frame.points))
```

This will add the logged points to the timelines `frame_idx` and `sensor_time`, as well as the automatic `log_time` timeline (and `log_tick`, if you opted in).
You can then choose which timeline you want to organize your data along in the expanded timeline view in the bottom of the Rerun Viewer.

### How to log precise times
Rerun supports three types of indices, all encoded as `i64`:
* Sequential
* Timestamp (nanoseconds since Unix epoch)
* Timedelta/duration (nanoseconds)

Here's how you use them:

```python
"""Set different types of indices."""

from datetime import datetime

import numpy as np

import rerun as rr

rr.init("rerun_example_different_indices", spawn=True)

rr.set_time("frame_nr", sequence=42)
rr.set_time("elapsed", duration=12)  # elapsed seconds
rr.set_time("time", timestamp=1_741_017_564)  # Seconds since unix epoch
rr.set_time("time", timestamp=datetime.fromisoformat("2025-03-03T15:59:24"))
rr.set_time(
    "precise_time", timestamp=np.datetime64(1_741_017_564_987_654_000, "ns")
)  # Nanoseconds since unix epoch

# All following logged data will be timestamped with the above times:
rr.log("points", rr.Points2D([[0, 0], [1, 1]]))
```

### Reset active timeline & differing data per timeline

You can clear the active timeline(s) at any point using `reset_time`.
This can be particularly useful when you want to log different data for individual timelines as illustrated here:

```python
"""Log different data on different timelines."""

import rerun as rr
import rerun.blueprint as rrb

rr.init("rerun_example_different_data_per_timeline", spawn=True)

rr.set_time("blue timeline", sequence=0)
rr.set_time("red timeline", duration=0.0)
rr.log("points", rr.Points2D([[0, 0], [1, 1]], radii=rr.Radius.ui_points(10.0)))

# Log a red color on one timeline.
rr.reset_time()  # Clears all set timeline info.
rr.set_time("red timeline", duration=1.0)
rr.log("points", rr.Points2D.from_fields(colors=[255, 0, 0]))

# And a blue color on the other.
rr.reset_time()  # Clears all set timeline info.
rr.set_time("blue timeline", sequence=1)
rr.log("points", rr.Points2D.from_fields(colors=[0, 0, 255]))


# Set view bounds:
rr.send_blueprint(
    rrb.Spatial2DView(
        visual_bounds=rrb.VisualBounds2D(x_range=[-1, 2], y_range=[-1, 2])
    )
)
```

On one timeline the points will appear blue, on the other they appear red.

### Sending many time points at once
To get full control over the logged timelines you can use [`send_columns`](https://rerun.io/docs/howto/logging-and-ingestion/send-columns.md).
This is often a lot more efficient when you already have a chunk of temporal data, e.g. some sensor value over time.


## Events

An _event_ refer to an instance of logging one or more component batches to one or more timelines. In the viewer, the Time panel provide a graphical representation of these events across time and entities.

<picture>
  <img src="https://static.rerun.io/event/57255c0552d76ca2837c2e9581a4dc3534b105a5/full.png" alt="">
  <source media="(max-width: 480px)" srcset="https://static.rerun.io/event/57255c0552d76ca2837c2e9581a4dc3534b105a5/480w.png">
  <source media="(max-width: 768px)" srcset="https://static.rerun.io/event/57255c0552d76ca2837c2e9581a4dc3534b105a5/768w.png">
  <source media="(max-width: 1024px)" srcset="https://static.rerun.io/event/57255c0552d76ca2837c2e9581a4dc3534b105a5/1024w.png">
  <source media="(max-width: 1200px)" srcset="https://static.rerun.io/event/57255c0552d76ca2837c2e9581a4dc3534b105a5/1200w.png">
</picture>


## Static data

The [`rr.log()`](https://ref.rerun.io/docs/python/stable/common/logging_functions/#rerun.log) function has a `static=False` default argument.
If `static=True` is used instead, the data logged becomes *static*. Static data belongs to all timelines (existing ones, and ones not yet created) and shadows any temporal data of the same type on the same entity.

This is useful for data that isn't part of normal data capture, but sets the scene for how it should be shown.
For instance, if you are logging cars on a street, perhaps you want to always show a street mesh as part of the scenery, and for that it makes sense for that data to be static.

Similarly, [coordinate systems](https://rerun.io/docs/concepts/logging-and-ingestion/transforms.md) or [annotation context](https://rerun.io/docs/concepts/visualization/annotation-context.md) are typically static.

You can read more about static data in the [dedicated section](https://rerun.io/docs/concepts/logging-and-ingestion/static.md).
