Function get_events_for_duration

Source
pub async fn get_events_for_duration(
    client: &Arc<ClientHandle>,
    start: SystemTime,
    end: SystemTime,
) -> Vec<PersistedLogEntry>
Expand description

Searches through the event log for all events that occurred within the specified time bounds.

Because it is inefficient to search the log backwards, instead this function traverses the log forwards, but in batches. All events are appended to an array until the cutoff event where the timestamp is greater than the start timestamp or the end of the log is hit.