Boost logo

Boost Users :

From: Kevin Heifner (heifnerk_at_[hidden])
Date: 2008-05-19 11:39:19


Victor Whiskey Yankee wrote:
> I'm using boost 1.35.
>
> Would someone please give example of best way to sleep for a specified
> duration of milliseconds or nanoseconds?

boost::this_thread::sleep(boost::posix_time::milliseconds(10));
boost::this_thread::sleep(boost::posix_time::nanoseconds(10));

> It seems that xtime is being deprecated in the thread library, but the
> sleep function still wants an xtime?

Yes, xtime is deprecated.

KevinH

-- 
Kevin Heifner  heifner @ ociweb.com  http://heifner.blogspot.com
           Object Computing, Inc. (OCI) www.ociweb.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net