summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/libs/thread/src/pthread/timeconv.inl')
-rw-r--r--3rdParty/Boost/src/libs/thread/src/pthread/timeconv.inl11
1 files changed, 7 insertions, 4 deletions
diff --git a/3rdParty/Boost/src/libs/thread/src/pthread/timeconv.inl b/3rdParty/Boost/src/libs/thread/src/pthread/timeconv.inl
index 5ec3b17..b75a135 100644
--- a/3rdParty/Boost/src/libs/thread/src/pthread/timeconv.inl
+++ b/3rdParty/Boost/src/libs/thread/src/pthread/timeconv.inl
@@ -1,11 +1,14 @@
// Copyright (C) 2001-2003
// William E. Kempf
+// Copyright (C) 2009 Anthony Williams
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// boostinspect:nounnamed
+#include <boost/assert.hpp>
+
namespace {
const int MILLISECONDS_PER_SECOND = 1000;
const int NANOSECONDS_PER_SECOND = 1000000000;
@@ -18,7 +21,7 @@ inline void to_time(int milliseconds, boost::xtime& xt)
{
int res = 0;
res = boost::xtime_get(&xt, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ BOOST_ASSERT(res == boost::TIME_UTC);
xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
@@ -55,7 +58,7 @@ inline void to_timespec_duration(const boost::xtime& xt, timespec& ts)
boost::xtime cur;
int res = 0;
res = boost::xtime_get(&cur, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ BOOST_ASSERT(res == boost::TIME_UTC);
if (boost::xtime_cmp(xt, cur) <= 0)
{
@@ -86,7 +89,7 @@ inline void to_duration(boost::xtime xt, int& milliseconds)
boost::xtime cur;
int res = 0;
res = boost::xtime_get(&cur, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ BOOST_ASSERT(res == boost::TIME_UTC);
if (boost::xtime_cmp(xt, cur) <= 0)
milliseconds = 0;
@@ -108,7 +111,7 @@ inline void to_microduration(boost::xtime xt, int& microseconds)
boost::xtime cur;
int res = 0;
res = boost::xtime_get(&cur, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ BOOST_ASSERT(res == boost::TIME_UTC);
if (boost::xtime_cmp(xt, cur) <= 0)
microseconds = 0;