From 14fa1bad9263f14d4c823dd9f93ccb599a99756f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 21 Dec 2022 01:03:26 +0100 Subject: [PATCH] add TODO --- src/time/cuc.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/time/cuc.rs b/src/time/cuc.rs index bf87064..a7660e2 100644 --- a/src/time/cuc.rs +++ b/src/time/cuc.rs @@ -73,6 +73,8 @@ pub fn fractional_part_from_subsec_ns( // invalid fractional parts which are too large. For the division of the nanoseconds by the // smallest fraction, a flooring division is correct. // The multiplication with 100000 is necessary to avoid precision loss during integer division. + // TODO: Floating point division might actually be faster option, but requires additional + // code on small embedded systems.. let fractional_part = ns * 100000 / ((sec_as_ns * 100000 + resolution) / resolution); Some(FractionalPart(res, fractional_part as u32)) }