Skip to content

Commit a958a82

Browse files
committed
Clarify Timer precision
1 parent 5a50693 commit a958a82

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/timer.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@ use std::time::Instant;
1515
/// # Precision
1616
///
1717
/// There is a limit on the maximum precision that a `Timer` can provide. This limit is
18-
/// dependent on the current platform; for instance, on Windows, the maximum precision is
18+
/// dependent on the current platform and follows the precision provided by the `embassy-time`
19+
/// crate for that platform; for instance, on Windows, the maximum precision is
1920
/// about 16 milliseconds. Because of this limit, the timer may sleep for longer than the
2021
/// requested duration. It will never sleep for less.
2122
///
23+
/// On embedded platforms like ESP-IDF, the precision is much higer (up to 1 microsecond),
24+
/// because the `embassy-time` crate for ESP-IDF uses the ESP-IDF Timer service.
25+
///
2226
/// # Examples
2327
///
2428
/// Sleep for 1 second:

0 commit comments

Comments
 (0)