From 291c1b2b556711bc663d7cba0ac51ed15ee0f52c Mon Sep 17 00:00:00 2001 From: Julien Enoch Date: Fri, 15 Sep 2023 15:56:36 +0200 Subject: [PATCH] Revise doc of NTP64::as_secs_f64() --- src/ntp64.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ntp64.rs b/src/ntp64.rs index abe39b9..97a531a 100644 --- a/src/ntp64.rs +++ b/src/ntp64.rs @@ -66,10 +66,10 @@ impl NTP64 { /// Returns this NTP64 as a f64 in seconds. /// - /// The decimal part of the f64 is the result of a division of NTP64's Fraction part by 2^32. - /// As a consequence, the even if resulting f64 seems to have a precision lower than 1 nanosecond, - /// that's not the case. It still has the precision of the time source - /// (3.5 nanosecond if generated by [`crate::HLC`]). + /// The integer part of the f64 is the NTP64's Seconds part. + /// The decimal part of the f64 is the result of a division of NTP64's Fraction part divided by 2^32. + /// Considering the probable large number of Seconds (for a time relative to UNIX_EPOCH), the precision of the resulting f64 might be in the order of microseconds. + /// Therefore, it should not be used for comparison. Directly comparing [NTP64] objects is preferable. #[inline] pub fn as_secs_f64(&self) -> f64 { let secs: f64 = self.as_secs() as f64;