select() sleep

Soooo just read this in the fd_set(3) man page

Some code calls select() with all three sets empty, n zero, and a non-NULL timeout as a fairly portable way to sleep with subsecond precision.


I hadn't thought about it, but that seems like a good way to sleep on the three main systems!

On another note. I am disliking learning asynchronous sockets. Mostly because I'm failing =)
closed account (S6k9GNh0)
I'd rather use Boost.Thread's sleep() function.

http://www.boost.org/doc/libs/1_46_1/doc/html/thread/thread_management.html#thread.thread_management.thread.sleep
Ya boost does have some pretty awesome stuff.
Topic archived. No new replies allowed.