diff --git a/embassy-executor/Cargo.toml b/embassy-executor/Cargo.toml index 409df0d75..0762e2434 100644 --- a/embassy-executor/Cargo.toml +++ b/embassy-executor/Cargo.toml @@ -34,6 +34,7 @@ log = { version = "0.4.14", optional = true } rtos-trace = { version = "0.1.2", optional = true } embassy-executor-macros = { version = "0.4.0", path = "../embassy-executor-macros" } +embassy-time = { version = "0.3.0", path = "../embassy-time", optional = true } embassy-time-driver = { version = "0.1.0", path = "../embassy-time-driver", optional = true } embassy-time-queue-driver = { version = "0.1.0", path = "../embassy-time-queue-driver", optional = true } critical-section = "1.1" @@ -71,6 +72,9 @@ turbowakers = [] ## Use the executor-integrated `embassy-time` timer queue. integrated-timers = ["dep:embassy-time-driver", "dep:embassy-time-queue-driver"] +# Support for rtos trace require time +rtos-trace = ["dep:rtos-trace", "dep:embassy-time"] + #! ### Architecture _arch = [] # some arch was picked ## std diff --git a/embassy-executor/src/raw/mod.rs b/embassy-executor/src/raw/mod.rs index 3f00be4a8..fbc0481c2 100644 --- a/embassy-executor/src/raw/mod.rs +++ b/embassy-executor/src/raw/mod.rs @@ -588,7 +588,7 @@ impl rtos_trace::RtosTraceOSCallbacks for Executor { } #[cfg(feature = "integrated-timers")] fn time() -> u64 { - Instant::now().as_micros() + embassy_time::Instant::now().as_millis() } #[cfg(not(feature = "integrated-timers"))] fn time() -> u64 {