From 7cad7f6b3dbbd1a831cf86b149474e083f2727ba Mon Sep 17 00:00:00 2001 From: Neil Shen Date: Fri, 12 Jan 2018 13:38:24 +0800 Subject: [PATCH] Fix Duration::subsec_millis and Duration::subsec_micros examples --- src/libstd/time/duration.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstd/time/duration.rs b/src/libstd/time/duration.rs index 15ddb62bab5..cb5bfb9176e 100644 --- a/src/libstd/time/duration.rs +++ b/src/libstd/time/duration.rs @@ -206,7 +206,7 @@ impl Duration { /// /// let duration = Duration::from_millis(5432); /// assert_eq!(duration.as_secs(), 5); - /// assert_eq!(duration.subsec_nanos(), 432_000_000); + /// assert_eq!(duration.subsec_millis(), 432); /// ``` #[unstable(feature = "duration_extras", issue = "46507")] #[inline] @@ -226,7 +226,7 @@ impl Duration { /// /// let duration = Duration::from_micros(1_234_567); /// assert_eq!(duration.as_secs(), 1); - /// assert_eq!(duration.subsec_nanos(), 234_567_000); + /// assert_eq!(duration.subsec_micros(), 234_567); /// ``` #[unstable(feature = "duration_extras", issue = "46507")] #[inline]