diff options
Diffstat (limited to 'Swiften/Base/sleep.cpp')
-rw-r--r-- | Swiften/Base/sleep.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/Swiften/Base/sleep.cpp b/Swiften/Base/sleep.cpp index 0c450c3..48eae51 100644 --- a/Swiften/Base/sleep.cpp +++ b/Swiften/Base/sleep.cpp @@ -1,25 +1,18 @@ /* - * Copyright (c) 2010 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include <Swiften/Base/sleep.h> -#include <boost/thread.hpp> -#include <boost/version.hpp> +#include <chrono> +#include <thread> namespace Swift { void sleep(unsigned int msecs) { - boost::xtime xt; -#if BOOST_VERSION >= 105000 - boost::xtime_get(&xt, boost::TIME_UTC_); -#else - boost::xtime_get(&xt, boost::TIME_UTC); -#endif - xt.nsec += msecs*1000000; - boost::thread::sleep(xt); + std::this_thread::sleep_for(std::chrono::milliseconds(msecs)); } } |