From 0189a21c19c70d52c6c410df00f3ea48b445b9a3 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Sat, 29 Jan 2022 20:41:18 +0000 Subject: [PATCH] Document `SystemTime` platform precision --- library/std/src/time.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 @@ /// } /// ``` /// -/// # 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 |