C++: std::chrono or boost::chrono
boost, c++, c++-chrono, stl
Solution
It depends on what do you want to achieve. C++ chrono pros:
- Better understandability (more users know standard library than boost)
- Better portability (in case you have decided to use c++11)
- Maybe it will work faster.
- Don't add additional dependencies to project.
Boost chrono pros:
- Works for c++03
- Provides more functionality.
So, if you don't need that additional io functions and don't need c++03 support, use standard library.
Problem
I'm doing some benchmarking in my code and I'm trying to figure out if I should use the standard version of chrono or the original one provided by Boost. I started using the standard one because I wanted to try it out, and noticed that for example it doesn't provide io functions like the chrono provided by Boost does. So, regarding chrono and in general, should I use Boost libraries or their standard library counterparts?