f*s
2 楼
it look cheap and support lots of framework, any one ever tried it?
k*l
3 楼
I know there is a sleep(10), 不过这个是等待10秒,如果我的程序本身要比如2~3s
才能完成就得等7~8s,应该有个类似sleep的library 能设定每10s开始运行一次吧,
boost里面有么?谢谢
才能完成就得等7~8s,应该有个类似sleep的library 能设定每10s开始运行一次吧,
boost里面有么?谢谢
z*d
8 楼
using it
works fine now
works fine now
r*r
9 楼
boost::asio. pretty neat stuff.
btw, using select() is not portable.
btw, using select() is not portable.
c*e
11 楼
I am using it now, pretty good so far
t*y
13 楼
web address?
r*r
14 楼
alarm() 's timer is not very accurate. get/setitimer() can be precise up to
microsec.
microsec.
k*l
16 楼
懂boost的人能帮忙看看这段程行么:只要myEngineOn==true; myEngine_run() 每10秒
钟被call一次:
while(myEngineOn){
boost::xtime xt;
boost::xtime_get(&xt, boost::TIME_UTC);
xt.sec+=10;
myEngine_run(); //这个function应该不会超过两秒
boost::thread::sleep(xt);
//这里的意思是睡到xt, 不是睡xt那么长时间---If I understand
}
【在 r*********r 的大作中提到】
: boost::asio. pretty neat stuff.
: btw, using select() is not portable.
钟被call一次:
while(myEngineOn){
boost::xtime xt;
boost::xtime_get(&xt, boost::TIME_UTC);
xt.sec+=10;
myEngine_run(); //这个function应该不会超过两秒
boost::thread::sleep(xt);
//这里的意思是睡到xt, 不是睡xt那么长时间---If I understand
}
【在 r*********r 的大作中提到】
: boost::asio. pretty neat stuff.
: btw, using select() is not portable.
相关阅读
C++ questionsexpert system shell 现在哪个好些? clips? jess? or ???面试题 -算法?how to know the stack size of your system?两个继承问题Unix Network Programming 请问c++为什么会编译失败?一个简单的小问题C源程序能不能知道gcc的优化选项呢?Java read/write binary floating point data files?学习multi threading, 有什么好书?difference between FILE and struct FILE从DLL上看,能不能知道是哪个编译器编译出来的么遇到一个怪问题来几个C++测试题operator overloading<< or >>How to run Message Passing Interface C file?问个问题How to use CTabCtrl in VC?template class instantiation问题