Skip to content

Commit

Permalink
Add humantime to format strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper committed Dec 13, 2024
1 parent 4fbab26 commit cd2390b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jsonwebtoken = { version = "9.3.0", optional = true }

http = { version = "1.1.0", optional = true }

humantime = "2.1.0"

[dev-dependencies]
googletest = "0.11.0"
test-log = { version = "0.2.16", default-features = false, features = ["trace", "color"] }
Expand Down
8 changes: 6 additions & 2 deletions src/vm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use std::borrow::Cow;
use std::collections::VecDeque;
use std::fmt;
use std::mem::size_of;
use std::time::Duration;
use std::time::{Duration, SystemTime};
use strum::IntoStaticStr;
use tracing::{enabled, instrument, Level};

Expand Down Expand Up @@ -436,7 +436,11 @@ impl super::VM for CoreVM {
ret
)]
fn sys_sleep(&mut self, wake_up_time: Duration) -> VMResult<AsyncResultHandle> {
invocation_debug_logs!(self, "Executing 'Sleep for {wake_up_time:?}'");
invocation_debug_logs!(
self,
"Executing 'Sleep for {}'",
humantime::format_rfc3339(SystemTime::UNIX_EPOCH + wake_up_time)
);
self.do_transition(SysCompletableEntry(
"SysSleep",
SleepEntryMessage {
Expand Down

0 comments on commit cd2390b

Please sign in to comment.