$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
From: hongleij_at_[hidden]
Date: 2007-02-01 07:09:45
hi:
it really a trouble thing for me to use boost::thread::sleep()
:
boost::xtime helloworldtime;
boost::xtime_get(&helloworldtime, boost::TIME_UTC);
helloworldtime.sec += 6;
boost::thread::sleep(helloworldtime);
i think
"boost::thread::sleep(1500) //millisecond "
may easy my programming;if have such interface;
now i use :
void thread_sleep(unsigned int interval) //millisecond
{
boost::xtime xt;
boost::xtime_get(&xt, boost::TIME_UTC);
int sec=interval/1000;
int msec=interval-1000*sec;
xt.nsec += 1000*1000*msec;
xt.sec+= sec;
boost::thread::sleep(xt);
}
best wishes;-)