Boost logo

Boost Users :

Subject: Re: [Boost-users] Chrono System time Conversion to Since Epoch not working
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2011-10-18 15:27:32


Le 18/10/11 19:34, Michael Chrostowski a écrit :
> Hi,
>
> I'm using boost 1.47 on Visual Studio 2008 and cannot seem to get the
> time since epoch from the Chrono library.
>
> At first I noticed that boost::chrono::system_time::now() does not
> have to be represented in time since epoch format so I don't believe
> that's an issue. However, I tried
> calling boost::chrono::system_time::now().time_since_epoch() and I get
> the same return result as if I was only referencing now(). That is, it
> is not time since epoch.
>
> Calling the static method to_time_t() DOES return proper time since
> epoch but it is in seconds (as time_t generally is) and is not what
> I'm looking for.
>
>
Hi,

the single difference between now() and now()::time_since_epoch() is
that the first is a time_point, while the second is a duration.

Could you post the code and your results, so we can see what is going wrong?

Best,
Vicente


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