EventTime
#
Bases: object
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.
as_tuple
property
#
dt
property
#
Returns the UTC datetime representation of this EventTime's timestamp.
Returns:
| Type | Description |
|---|---|
datetime
|
The UTC datetime. |
Raises:
| Type | Description |
|---|---|
TimeError
|
Returns TimeError on timestamp conversion errors (e.g. out-of-range timestamp). |
event_id
property
#
Returns the event id used to order events within the same timestamp.
Returns:
| Type | Description |
|---|---|
int
|
The event id. |
t
property
#
Returns the timestamp in milliseconds since the Unix epoch.
Returns:
| Type | Description |
|---|---|
int
|
Milliseconds since the Unix epoch. |
__eq__(value)
#
Return self==value.
__ge__(value)
#
Return self>=value.
__gt__(value)
#
Return self>value.
__hash__()
#
Return hash(self).
__int__()
#
int(self)
__le__(value)
#
Return self<=value.
__lt__(value)
#
Return self<value.
__ne__(value)
#
Return self!=value.
__new__(timestamp, event_id=None)
#
Create and return a new object. See help(type) for accurate signature.
__repr__()
#
Return repr(self).