0
我試圖用boost :: this_thread :: sleep在多線程代碼中實現小時間延遲。 下面是代碼示例:通過auto_cpu_timer產生奇怪的boost :: this_thread ::睡眠行爲
{
boost::timer::auto_cpu_timer t;//just to check sleep interval
boost::this_thread::sleep(boost::posix_time::milliseconds(25));
}
輸出困惑我點點:
0.025242s wall, 0.010000s user + 0.020000s system = 0.030000s CPU (118.9%)
爲什麼0.025242s但不0.0025242s?