const boost::posix_time::ptime now;
boost::posix_time::second_clock::local_time();
now.date().year();
now.date().month();
now.date().day();
now.time_of_day().hours();
now.time_of_day().minutes();
now.time_of_day().seconds();
I figured out how to get years, months, days, hours, minutes, and seconds using boost::posix_time::ptime.
But I can't get sub seconds of ptime. Is there any way to get milliseconds, microseconds, or nanoseconds?
Thanks.
Aucun commentaire:
Enregistrer un commentaire