Skip to content

Commit e072590

Browse files
committed
samples: async-philosophers: Remove overly specific imports
Import the embassy crates, but not by path. Also, remove the specific time instance. Although and specific application will likely want to use a non-default tick rate, leaving at the 1us tick will allow the time to be used (with a slight performance cost) with any time base. Signed-off-by: David Brown <[email protected]>
1 parent 974b50b commit e072590

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

samples/async-philosophers/Cargo.toml

+6-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ static_cell = "2.1"
1919
embassy-executor = { version = "0.7.0", features = ["log", "task-arena-size-2048"] }
2020
embassy-sync = "0.6.2"
2121

22-
# TODO: Don't hardcode the tickrate.
23-
embassy-time = { version = "0.4.0", features = ["tick-hz-10_000"] }
22+
# For real builds, you should figure out your target's tick rate and set the appropriate feature,
23+
# like in these examples. Without this, embassy-time will assume a 1Mhz tick rate, and every time
24+
# operation will involve a conversion.
25+
embassy-time = "0.4.0"
26+
# embassy-time = { version = "0.4.0", features = ["tick-hz-10_000"] }
27+
# embassy-time = { version = "0.4.0", features = ["tick-hz-100"] }
2428

2529
# Dependencies that are used by build.rs.
2630
[build-dependencies]

0 commit comments

Comments
 (0)