rust/hwphysics/src/time.rs
changeset 15767 a818a87fec52
parent 15282 478d5372eb4a
child 15768 704f00889f3a
equal deleted inserted replaced
15766:19ad3fe48ea6 15767:a818a87fec52
    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         };