diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-01-31 07:00:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-31 07:00:43 +0100 |
| commit | bc2c4feaeb43c14bd42709eb03615dfb48553950 (patch) | |
| tree | 11d151cea87e39f393c001bc912feac14328c18b /library/std/src | |
| parent | c1e2948c21398d98ada51f27bd9fa3ada439e03d (diff) | |
| parent | 0189a21c19c70d52c6c410df00f3ea48b445b9a3 (diff) | |
| download | rust-bc2c4feaeb43c14bd42709eb03615dfb48553950.tar.gz rust-bc2c4feaeb43c14bd42709eb03615dfb48553950.zip | |
Rollup merge of #93462 - ChrisDenton:systime-doc, r=joshtriplett
Document `SystemTime` platform precision Fixes #88822
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/time.rs | 7 |
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 | |
