fix: rtos-usage time missing

This commit is contained in:
xgroleau🐢 2024-02-06 10:38:48 -05:00
parent ad7d4494fa
commit 5f36108896
2 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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 {