2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-22 17:52:18 +00:00
Files
thread/example/xtime.cpp
William E. Kempf 4cb9c412e8 Added examples from documentation
[SVN r14869]
2002-08-15 01:22:29 +00:00

11 lines
237 B
C++

#include <boost/thread/thread.hpp>
#include <boost/thread/xtime.hpp>
int main(int argc, char* argv[])
{
boost::xtime xt;
boost::xtime_get(&xt, boost::TIME_UTC);
xt.sec += 1;
boost::thread::sleep(xt); // Sleep for 1 second
}