diff options
| author | troido <troido@protonmail.com> | 2020-02-28 16:41:11 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-28 16:41:11 +0100 |
| commit | c846e929a88837094d7a5383a306df1fec56c333 (patch) | |
| tree | 48ab058d58c090ff00199af6b3eef7d64c7c2c95 /src/room.rs | |
| parent | b80036ef629e0803f3a70059a8fa12d1a2ae3b2d (diff) | |
more specific types!
Diffstat (limited to 'src/room.rs')
| -rw-r--r-- | src/room.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/room.rs b/src/room.rs index f3861dc..81b8cd0 100644 --- a/src/room.rs +++ b/src/room.rs @@ -59,7 +59,8 @@ use crate::{ PlayerId, RoomId, aerr, - Result + Result, + Timestamp }; @@ -142,7 +143,7 @@ impl <'a, 'b>Room<'a, 'b> { self.world.fetch::<Output>().output.clone() } - pub fn update(&mut self, timestamp: i64) { + pub fn update(&mut self, timestamp: Timestamp) { self.world.fetch_mut::<TimeStamp>().time = timestamp; self.dispatcher.dispatch(&self.world); self.world.maintain(); @@ -241,7 +242,7 @@ impl <'a, 'b>Room<'a, 'b> { emigrants } - pub fn get_time(&self) -> i64 { + pub fn get_time(&self) -> Timestamp { self.world.fetch::<TimeStamp>().time } } |
