equal
deleted
inserted
replaced
66 } |
66 } |
67 } |
67 } |
68 |
68 |
69 pub fn register(&mut self, gear_id: GearId, timeout: Millis) -> EventId { |
69 pub fn register(&mut self, gear_id: GearId, timeout: Millis) -> EventId { |
70 let event_id = self.current_event_id; |
70 let event_id = self.current_event_id; |
71 self.current_event_id.wrapping_add(1); |
71 self.current_event_id = self.current_event_id.wrapping_add(1); |
72 let event = TimeEvent { |
72 let event = TimeEvent { |
73 time: self.current_time + timeout, |
73 time: self.current_time + timeout, |
74 gear_id, |
74 gear_id, |
75 event_id, |
75 event_id, |
76 }; |
76 }; |