c++ - Constructing a boost::posix_time::time_duration from microseconds -
one can total number of microseconds time_duration via total_microseconds method, can't figure out how re-construct time_duration number. there seems no constructors such purpose in documentation, missing something?
there boost::posix_time::microseconds:
#include <iostream> #include <boost/date_time.hpp> namespace bpt = boost::posix_time; int main() { bpt::time_duration td = bpt::microseconds(12345678); std::cout << td << '\n'; }
Comments
Post a Comment