|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66141 - trunk/boost/thread
From: anthony_at_[hidden]
Date: 2010-10-22 05:26:18
Author: anthonyw
Date: 2010-10-22 05:26:15 EDT (Fri, 22 Oct 2010)
New Revision: 66141
URL: http://svn.boost.org/trac/boost/changeset/66141
Log:
Fixed issue #4727 --- only use microsec clock if available
Text files modified:
trunk/boost/thread/thread_time.hpp | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
Modified: trunk/boost/thread/thread_time.hpp
==============================================================================
--- trunk/boost/thread/thread_time.hpp (original)
+++ trunk/boost/thread/thread_time.hpp 2010-10-22 05:26:15 EDT (Fri, 22 Oct 2010)
@@ -6,6 +6,7 @@
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
+#include <boost/date_time/time_clock.hpp>
#include <boost/date_time/microsec_time_clock.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
@@ -17,7 +18,11 @@
inline system_time get_system_time()
{
+#if defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
return boost::date_time::microsec_clock<system_time>::universal_time();
+#else // defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
+ return boost::date_time::second_clock<system_time>::universal_time();
+#endif // defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
}
namespace detail
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk