我有一个任务要每“轮”分钟(在xx:xx:00)做一些事情我使用类似的东西constintstatisticsInterval=60;time_tt=0;while(1){if(abs(t-time(NULL)==0))//toavoidmultiplecallsinthesamesecondthatisthemultipleof60boost::this_thread::sleep(boost::posix_time::seconds(2));//2,not1tomakesurethat1secondpassest=time(NULL);boost::this_thread::sle
我有一个任务要每“轮”分钟(在xx:xx:00)做一些事情我使用类似的东西constintstatisticsInterval=60;time_tt=0;while(1){if(abs(t-time(NULL)==0))//toavoidmultiplecallsinthesamesecondthatisthemultipleof60boost::this_thread::sleep(boost::posix_time::seconds(2));//2,not1tomakesurethat1secondpassest=time(NULL);boost::this_thread::sle