Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Appendix: FAQ

Why does process_cpu_clock sometimes give more cpu seconds than real seconds?

Ask your operating system supplier. The results have been inspected with a debugger, and both for Windows and Linux, that's what the OS appears to be reporting at times.

Are integer overflows in the duration arithmetic detected and reported?

Boost.Ratio avoids all kind of overflow that could result of arithmetic operation and that can be simplified. The typedefs durations don't detect overflow. You will need a duration representation that handles overflow.

Which clocks should be used to benchmarking?

Each clock has his own features. It depends on what do you need to benchmark. Most of the time, you could be interested in using a thread clock, but if you need to measure code subject to synchronization a process clock would be better. If you have a multi-process application, a system-wide clock could be needed.

Which clocks should be used for watching?

For trace purposes, it is probably best to use a system-wide clock.


PrevUpHomeNext