On 12/30/2011 3:51 AM, Ion Gaztañaga wrote:
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_clockboost::posix_time::ptime::universal_time()
+ boost::posix_time::seconds(10)
Yes. I should document it, but internally the library uses universal_time().
OK, that is a surprise ! You really need to document that all timed locks in interprocess use UTC and not local time. IMO saying "absolute time" as you do in the doc does not infer UTC, and it is more than natural to wrongly assume local time.