1 // Copyright (C) 2001-2003 2 // William E. Kempf 3 // 4 // Distributed under the Boost Software License, Version 1.0. (See accompanying 5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 7 #define BOOST_THREAD_VERSION 2 8 9 #include <boost/thread/thread_only.hpp> 10 #include <boost/thread/xtime.hpp> 11 main()12int main() 13 { 14 boost::xtime xt; 15 boost::xtime_get(&xt, boost::TIME_UTC_); 16 xt.sec += 1; 17 boost::thread::sleep(xt); // Sleep for 1 second 18 } 19