smgw_core/registration.rs
1/// Reference-slot spacing in the BSI TR-03109-1 v2.0 billing profiles.
2#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3pub enum Period {
4 FiveMinutes,
5 QuarterHour,
6 Hour,
7}
8
9impl Period {
10 pub const fn seconds(self) -> i64 {
11 match self {
12 Self::FiveMinutes => 300,
13 Self::QuarterHour => 900,
14 Self::Hour => 3600,
15 }
16 }
17}