Add waiting for next period

This commit is contained in:
Tobias Reisinger 2024-04-26 00:00:42 +02:00
parent 6f2deb38e1
commit 0b0350da0e
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
5 changed files with 105 additions and 37 deletions
emgauwa-lib/src/models

View file

@ -79,4 +79,8 @@ impl Relay {
pub fn is_on(&self, now: &NaiveTime) -> bool {
self.active_schedule.is_on(now)
}
pub fn get_next_time(&self, now: &NaiveTime) -> Option<NaiveTime> {
self.active_schedule.get_next_time(now)
}
}