Boost logo

Boost Users :

Subject: Re: [Boost-users] [inteprocess] timed_lock absolute time
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2011-12-30 03:51:09


El 30/12/2011 1:56, Edward Diener escribió:
> On 12/29/2011 5:50 PM, Ion Gaztañaga wrote:
>> El 27/12/2011 2:17, Edward Diener escribió:
>>> Is the "absolute time" mentioned when using a mutex and timed_lock a
>>> local time or a UTC time ? I am guessing a local time but I just want to
>>> make sure.
>>
>> If you see code, it's universal_time() (UTC)
>
> I do not know what you mean by "if you see code". If I want to set a
> duration of 10 seconds beyond the current time for my timed_lock to
> expire, are you saying I should pass:
>
> boost::date_time::second_clock<boost::posix_time::ptime>::universal_time()
> + boost::posix_time::seconds(10)

Yes. I should document it, but internally the library uses universal_time().

Ion


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