summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-02-11 12:14:00 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-02-11 12:14:00 (GMT)
commit0efa7c32aaf21a29b42b5926cc116007056843be (patch)
tree882f663a5dd0e65694bf6077b71086dd77fd7ff8 /3rdParty/Boost/boost/thread/xtime.hpp
parent1d20eabbc32274b491b4c2bedf73d19933d97bfd (diff)
downloadswift-contrib-0efa7c32aaf21a29b42b5926cc116007056843be.zip
swift-contrib-0efa7c32aaf21a29b42b5926cc116007056843be.tar.bz2
Moved some modules into separate git modules.
Diffstat (limited to '3rdParty/Boost/boost/thread/xtime.hpp')
m---------3rdParty/Boost0
-rw-r--r--3rdParty/Boost/boost/thread/xtime.hpp92
2 files changed, 0 insertions, 92 deletions
diff --git a/3rdParty/Boost b/3rdParty/Boost
new file mode 160000
+Subproject 3bbdbc8cf1996f23d9a366da8bac0f97be6ad79
diff --git a/3rdParty/Boost/boost/thread/xtime.hpp b/3rdParty/Boost/boost/thread/xtime.hpp
deleted file mode 100644
index 7cc6272..0000000
--- a/3rdParty/Boost/boost/thread/xtime.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (C) 2001-2003
-// William E. Kempf
-// Copyright (C) 2007-8 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)
-
-#ifndef BOOST_XTIME_WEK070601_HPP
-#define BOOST_XTIME_WEK070601_HPP
-
-#include <boost/thread/detail/config.hpp>
-
-#include <boost/cstdint.hpp>
-#include <boost/thread/thread_time.hpp>
-#include <boost/date_time/posix_time/conversion.hpp>
-
-#include <boost/config/abi_prefix.hpp>
-
-namespace boost {
-
-enum xtime_clock_types
-{
- TIME_UTC=1
-// TIME_TAI,
-// TIME_MONOTONIC,
-// TIME_PROCESS,
-// TIME_THREAD,
-// TIME_LOCAL,
-// TIME_SYNC,
-// TIME_RESOLUTION
-};
-
-struct xtime
-{
-#if defined(BOOST_NO_INT64_T)
- typedef int_fast32_t xtime_sec_t; //INT_FAST32_MIN <= sec <= INT_FAST32_MAX
-#else
- typedef int_fast64_t xtime_sec_t; //INT_FAST64_MIN <= sec <= INT_FAST64_MAX
-#endif
-
- typedef int_fast32_t xtime_nsec_t; //0 <= xtime.nsec < NANOSECONDS_PER_SECOND
-
- xtime_sec_t sec;
- xtime_nsec_t nsec;
-
- operator system_time() const
- {
- return boost::posix_time::from_time_t(0)+
- boost::posix_time::seconds(static_cast<long>(sec))+
-#ifdef BOOST_DATE_TIME_HAS_NANOSECONDS
- boost::posix_time::nanoseconds(nsec);
-#else
- boost::posix_time::microseconds((nsec+500)/1000);
-#endif
- }
-
-};
-
-inline xtime get_xtime(boost::system_time const& abs_time)
-{
- xtime res;
- boost::posix_time::time_duration const time_since_epoch=abs_time-boost::posix_time::from_time_t(0);
-
- res.sec=static_cast<xtime::xtime_sec_t>(time_since_epoch.total_seconds());
- res.nsec=static_cast<xtime::xtime_nsec_t>(time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second()));
- return res;
-}
-
-inline int xtime_get(struct xtime* xtp, int clock_type)
-{
- if (clock_type == TIME_UTC)
- {
- *xtp=get_xtime(get_system_time());
- return clock_type;
- }
- return 0;
-}
-
-
-inline int xtime_cmp(const xtime& xt1, const xtime& xt2)
-{
- if (xt1.sec == xt2.sec)
- return (int)(xt1.nsec - xt2.nsec);
- else
- return (xt1.sec > xt2.sec) ? 1 : -1;
-}
-
-} // namespace boost
-
-#include <boost/config/abi_suffix.hpp>
-
-#endif //BOOST_XTIME_WEK070601_HPP