2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 | Index | 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: [Merge] ~freddie-akeroyd/epics-base:fix_win32_monotonic_time into epics-base:7.0 |
From: | mdavidsaver via Core-talk <core-talk at aps.anl.gov> |
To: | mp+391018 at code.launchpad.net |
Date: | Wed, 30 Sep 2020 18:16:18 -0000 |
> What one would probably like to do is 1000000000 * val.QuadPart / freq.QuadPart in pure integer arithmetic, but the first bit will overflow quite soon. ... While it is likely not practical atm., as a note for the future both GCC and MSVC provide 128-bit integer math on at least x86_64 (but not x86). GCC >= 4.6 provides a new type '__int128'. https://gcc.gnu.org/onlinedocs/gcc/_005f_005fint128.html MSVC >= 2019 through a set of intrinsic functions operating on a pair of 64-bit integers. eg. https://docs.microsoft.com/en-us/cpp/intrinsics/div128?view=vs-2019 -- https://code.launchpad.net/~freddie-akeroyd/epics-base/+git/epics-base/+merge/391018 Your team EPICS Core Developers is subscribed to branch epics-base:7.0.