EventTime
Raphtory’s EventTime. Represents a unique timepoint in the graph’s history as (timestamp, event_id).
- timestamp: Number of milliseconds since the Unix epoch.
- event_id: ID used for ordering between equal timestamps.
Unless specified manually, the event ids are generated automatically by Raphtory to maintain a unique ordering of events. EventTime can be converted into a timestamp or a Python datetime, and compared either by timestamp (against ints/floats/datetimes/strings), by tuple of (timestamp, event_id), or against another EventTime.
Properties
| Property | Description |
|---|---|
as_tuple | Return this entry as a tuple of (timestamp, event_id), where the timestamp is in milliseconds. |
dt | Returns the UTC datetime representation of this EventTime's timestamp. |
event_id | Returns the event id used to order events within the same timestamp. |
t | Returns the timestamp in milliseconds since the Unix epoch. |
Property Details
as_tuple
Return this entry as a tuple of (timestamp, event_id), where the timestamp is in milliseconds.
Returns
dt
Returns the UTC datetime representation of this EventTime's timestamp.
Returns
| Type | Description |
|---|---|
| datetime | The UTC datetime. |
event_id
Returns the event id used to order events within the same timestamp.
Returns
| Type | Description |
|---|---|
| int | The event id. |
t
Returns the timestamp in milliseconds since the Unix epoch.
Returns
| Type | Description |
|---|---|
| int | Milliseconds since the Unix epoch. |