Boost logo

Boost Users :

From: Jean-Pierre Bergamin (james_at_[hidden])
Date: 2008-06-09 09:01:11


Sean Farrow schrieb:
> Which header is this declared in?
> Sean.
>
time_duration is declared in boost/date_time/time_duration.hpp, but you
probably want to include boost/date_time/posix_time/posix_time.hpp or
boost/date_time/posix_time/posix_time_types.hpp (if you don't need I/O
functionality).

See also:
http://www.boost.org/doc/libs/1_35_0/doc/html/date_time/posix_time.html#date_time.posix_time.time_duration

Regards

James

> -----Original Message-----
> From: boost-users-bounces_at_[hidden]
> [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Jean-Pierre
> Bergamin
> Sent: 09 June 2008 13:10
> To: boost-users_at_[hidden]
> Subject: [BULK] Re: [Boost-users] Converting seconds to minutes and
> seconds using boost::datetime
> Importance: Low
>
> Sean Farrow schrieb:
>
>> Does boost::datetime allow me to convert seconds (such as 164) to
>> minutes and seconds? If yes wha function does this.
>> Sean.
>>
>>
>>
> Construct a time_duration to get the information, i.e.:
>
> boost::posix_time::time_duration dur = boost::posix_time::seconds(164);
> long h = dur.hours(); long m = dur.minutes(); long s = dur.seconds();
>
>
> Regards
>
> James
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net