0

I was trying to implement small time delays in multithreading code using boost::this_thread::sleep. Here is code example:

{
    boost::timer::auto_cpu_timer t;//just to check sleep interval
    boost::this_thread::sleep(boost::posix_time::milliseconds(25));
}

Output generated by auto_cpu_timer confused me little bit:

0.025242s wall, 0.010000s user + 0.020000s system = 0.030000s CPU (118.9%)

Why it 0.025242s but not 0.0025242s ?

4

1 回答 1

2

Because 25 milliseconds is 0.025 seconds; 0.0025 seconds would be 2.5 milliseconds.

于 2012-05-15T05:05:13.187 回答