diff --git a/nexosim/src/time/clock.rs b/nexosim/src/time/clock.rs index dc9dc17..789558d 100644 --- a/nexosim/src/time/clock.rs +++ b/nexosim/src/time/clock.rs @@ -16,6 +16,18 @@ pub trait Clock: Send { fn synchronize(&mut self, deadline: MonotonicTime) -> SyncStatus; } +impl Clock for &mut C { + fn synchronize(&mut self, deadline: MonotonicTime) -> SyncStatus { + (**self).synchronize(deadline) + } +} + +impl Clock for Box { + fn synchronize(&mut self, deadline: MonotonicTime) -> SyncStatus { + (**self).synchronize(deadline) + } +} + /// The current synchronization status of a clock. #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] pub enum SyncStatus {