lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] (no subject)


From: Greg Chicares
Subject: [lmi-commits] (no subject)
Date: Sun, 5 Jun 2016 22:18:31 +0000 (UTC)

branch: master
commit e323c0fbb01c9ab94908a04cf4c9aa24bd71ed84
Author: Gregory W. Chicares <address@hidden>
Date:   Sun Jun 5 21:11:00 2016 +0000

    Use std::uint64_t for msw high-resolution timer
    
    Although this type is 'optional' in C++11, in practice it's safe to
    assume it's available with any reasonable compiler--see:
      http://lists.nongnu.org/archive/html/lmi/2016-06/msg00023.html
---
 timer.hpp |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/timer.hpp b/timer.hpp
index 43eb21b..c914a81 100644
--- a/timer.hpp
+++ b/timer.hpp
@@ -34,15 +34,8 @@
     // Compilers for this platform use various types for its high-
     // resolution timer, but they use the same platform API, so
     // it's sufficient to use the same 64-bit integer type for all.
-    //
-    // Type double can't be used, even though it be the right size:
-    // arithmetic performed on this type requires that it be integral.
-    //
-#   ifndef __BORLANDC__
-    typedef unsigned long long int elapsed_t;
-#   else // __BORLANDC__
-    typedef unsigned __int64 elapsed_t;
-#   endif // __BORLANDC__
+#   include <cstdint>
+    typedef std::uint64_t elapsed_t;
 #else // Unknown platform.
 #   include <ctime>
     typedef std::clock_t elapsed_t;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]