Module darkfi::event_graph::util
source ยท Expand description
Utility functions
Constantsยง
- DAY ๐Seconds in a day
Functionsยง
- days_since ๐Calculate the number of days since a given midnight timestamp.
- generate_genesis ๐Generate a deterministic genesis event corresponding to the DAGโs configuration.
- midnight_timestamp ๐Calculate the midnight timestamp given a number of days. If
days
is 0, calculate the midnight timestamp of today. - Calculate the timestamp of the next DAG rotation.
- replayer_log ๐
- Calculate the time in seconds until the next_rotation, given as a timestamp.
next_rotation
here represents a timestamp in UNIX epoch format.