node: Update `localtime` crate

This commit is contained in:
Alexis Sellier 2023-03-07 10:47:12 +01:00
parent 5fb5df2e61
commit 94899f7be2
No known key found for this signature in database
3 changed files with 5 additions and 5 deletions

4
Cargo.lock generated
View File

@ -1335,9 +1335,9 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
[[package]] [[package]]
name = "localtime" name = "localtime"
version = "1.1.0" version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f752d9826e5de9509879546e12b57259942fcbf2356bc2006f7da5f3fb2be587" checksum = "b2f2e37f115cdc432fcf760063d45a928f0ea80bcf10be3a6e516cbba883b15e"
[[package]] [[package]]
name = "log" name = "log"

View File

@ -23,7 +23,7 @@ io-reactor = { version = "0.1.1", features = ["popol"] }
lexopt = { version = "0.2.1" } lexopt = { version = "0.2.1" }
libc = { version = "0.2.137" } libc = { version = "0.2.137" }
log = { version = "0.4.17", features = ["std"] } log = { version = "0.4.17", features = ["std"] }
localtime = { version = "1.1.0" } localtime = { version = "1.2.0" }
netservices = { version = "0.2.0", features = ["io-reactor", "socket2"] } netservices = { version = "0.2.0", features = ["io-reactor", "socket2"] }
nonempty = { version = "0.8.1", features = ["serialize"] } nonempty = { version = "0.8.1", features = ["serialize"] }
qcheck = { version = "1", default-features = false, optional = true } qcheck = { version = "1", default-features = false, optional = true }

View File

@ -417,8 +417,8 @@ where
type Command = Control<G>; type Command = Control<G>;
fn tick(&mut self, time: Timestamp) { fn tick(&mut self, time: Timestamp) {
// TODO: Use millisecond precision. self.service
self.service.tick(LocalTime::from_secs(time.as_secs())); .tick(LocalTime::from_millis(time.as_millis() as u128));
} }
fn handle_timer(&mut self) { fn handle_timer(&mut self) {