now that we use boost.chrono, no need for custom timer or macros controlling which timer to use

This commit is contained in:
Arvid Norberg 2014-10-21 21:51:12 +00:00
parent 3db32f67b5
commit bcc5d66e0c
2 changed files with 1 additions and 43 deletions

View File

@ -37,20 +37,6 @@ POSSIBILITY OF SUCH DAMAGE.
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/stringize.hpp>
#if TORRENT_USE_BOOST_DATE_TIME
#define TORRENT_CFG_TIME boosttime_
#elif TORRENT_USE_ABSOLUTE_TIME
#define TORRENT_CFG_TIME absolutetime_
#elif TORRENT_USE_QUERY_PERFORMANCE_TIMER
#define TORRENT_CFG_TIME performancetimer_
#elif TORRENT_USE_CLOCK_GETTIME
#define TORRENT_CFG_TIME clocktime_
#elif TORRENT_USE_SYSTEM_TIME
#define TORRENT_CFG_TIME systime_
#else
#error what timer is used?
#endif
#if TORRENT_USE_IPV6
#define TORRENT_CFG_IPV6 ipv6_
#else
@ -64,7 +50,7 @@ POSSIBILITY OF SUCH DAMAGE.
#endif
#define TORRENT_CFG \
BOOST_PP_CAT(TORRENT_CFG_TIME, \
BOOST_PP_CAT(TORRENT_CFG_IPV6, \
TORRENT_CFG_DEPR)
#define TORRENT_CFG_STRING BOOST_PP_STRINGIZE(TORRENT_CFG)

View File

@ -593,34 +593,6 @@ int snprintf(char* buf, int len, char const* fmt, ...)
#define TORRENT_FUNCTION __FUNCTION__
#endif
// determine what timer implementation we can use
// if one is already defined, don't pick one
// autmatically. This lets the user control this
// from the Jamfile
#if !defined TORRENT_USE_ABSOLUTE_TIME \
&& !defined TORRENT_USE_QUERY_PERFORMANCE_TIMER \
&& !defined TORRENT_USE_CLOCK_GETTIME \
&& !defined TORRENT_USE_BOOST_DATE_TIME \
&& !defined TORRENT_USE_ECLOCK \
&& !defined TORRENT_USE_SYSTEM_TIME
#if defined __APPLE__ && defined __MACH__
#define TORRENT_USE_ABSOLUTE_TIME 1
#elif defined(_WIN32) || defined TORRENT_MINGW
#define TORRENT_USE_QUERY_PERFORMANCE_TIMER 1
#elif defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0
#define TORRENT_USE_CLOCK_GETTIME 1
#elif defined(TORRENT_AMIGA)
#define TORRENT_USE_ECLOCK 1
#elif defined(TORRENT_BEOS)
#define TORRENT_USE_SYSTEM_TIME 1
#else
#define TORRENT_USE_BOOST_DATE_TIME 1
#endif
#endif
// debug builds have asserts enabled by default, release
// builds have asserts if they are explicitly enabled by
// the release_asserts macro.