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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -