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
12int main()
13{
14 boost::xtime xt;
15 boost::xtime_get(xtp: &xt, clock_type: boost::TIME_UTC_);
16 xt.sec += 1;
17 boost::thread::sleep(xt); // Sleep for 1 second
18}
19

source code of boost/libs/thread/example/xtime.cpp