mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-09 13:39:46 -05:00
present signal days in API requests
I also enforced some invariants in the signals code, fixing a couple bugs. The signals code is more complex than I'd like, but hopefully is working now.
This commit is contained in:
@@ -281,6 +281,13 @@ impl fmt::Display for Duration {
|
||||
}
|
||||
}
|
||||
|
||||
impl ops::Mul<i64> for Duration {
|
||||
type Output = Self;
|
||||
fn mul(self, rhs: i64) -> Self::Output {
|
||||
Duration(self.0 * rhs)
|
||||
}
|
||||
}
|
||||
|
||||
impl ops::Add for Duration {
|
||||
type Output = Duration;
|
||||
fn add(self, rhs: Duration) -> Duration {
|
||||
|
||||
Reference in New Issue
Block a user