micromegas_telemetry/time_range.rs
1use chrono::{DateTime, Utc};
2
3/// A time range, with a beginning and an end.
4#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
5pub struct TimeRange {
6 pub begin: DateTime<Utc>,
7 pub end: DateTime<Utc>,
8}
9
10impl TimeRange {
11 pub fn new(begin: DateTime<Utc>, end: DateTime<Utc>) -> Self {
12 Self { begin, end }
13 }
14}