Expand description
The pause model shared by the monitor, the database layer and the views.
use kasl::libs::pause::Pause;
use chrono::{NaiveDateTime, Duration};
let pause = Pause::detected(
1,
NaiveDateTime::parse_from_str("2025-08-11 09:15:00", "%Y-%m-%d %H:%M:%S")?,
Some(NaiveDateTime::parse_from_str("2025-08-11 09:30:00", "%Y-%m-%d %H:%M:%S")?),
Some(Duration::minutes(15)),
);Structsยง
- Pause
- A single break period;
endanddurationstayNonewhile it is ongoing.