get milliseconds from boost::posix_time::time_duration

9 Aug
2012
9 Aug
'12
11:30 a.m.
Hi. I have a question regarding boost date_time library. Class time_duration doesn't have milliseconds() accessor function, what is the optimal way to get number of milliseconds using namespace boost::posix_time; ptime t1(date(2012,Aug,9), hours(19)+minutes(10)+seconds(24)+milliseconds(954)); int millisecs=t1.time_of_day().total_milliseconds()%1000; // result must be 954 Thanks, Roland
4713
Age (days ago)
4713
Last active (days ago)
2 comments
2 participants
participants (2)
-
Roland Uuesoo