about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Denton <christophersdenton@gmail.com>2022-01-29 20:41:18 +0000
committerChris Denton <christophersdenton@gmail.com>2022-01-29 20:41:18 +0000
commit0189a21c19c70d52c6c410df00f3ea48b445b9a3 (patch)
tree2eaee85bc36690c26b68df5557cb6670fa14700d
parenta00e130dae74a213338e2b095ec855156d8f3d8a (diff)
downloadrust-0189a21c19c70d52c6c410df00f3ea48b445b9a3.tar.gz
rust-0189a21c19c70d52c6c410df00f3ea48b445b9a3.zip
Document `SystemTime` platform precision
-rw-r--r--library/std/src/time.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/library/std/src/time.rs b/library/std/src/time.rs
index b4f9d8ea28d..2d2b96c8bce 100644
--- a/library/std/src/time.rs
+++ b/library/std/src/time.rs
@@ -176,7 +176,12 @@ pub struct Instant(time::Instant);
 /// }
 /// ```
 ///
-/// # Underlying System calls
+/// # Platform-specific behavior
+///
+/// The precision of `SystemTime` can depend on the underlying OS-specific time format.
+/// For example, on Windows the time is represented in 100 nanosecond intervals whereas Linux
+/// can represent nanosecond intervals.
+///
 /// Currently, the following system calls are being used to get the current time using `now()`:
 ///
 /// |  Platform |               System call                                            |