You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm used to using boost::posix_time::microsec_clock::local_time() or std::chrono::steady_clock::now() as my time base for most boost timed wait functionality. However, it seems that interprocess_condition::timed_wait() returns false immediately for me when I have a time 1 second in the future (I am in UTC-7 time zone). Things start to work fine if I either adjust my system time to UTC+0 or update the code to instead use boost::posix_time::microsec_clock::universal_time() as my time base.
The text was updated successfully, but these errors were encountered:
If this is instead a misunderstanding on my end, I would like to see the documentation updated to clarify this.
The one area I have played around with where the type of clock used didn't seem to matter was with boost::asio::io_service::run_until() where I use an offset from std::chrono::steady_clock::now(). Since this is all a part of boost, I assumed I could just reference this code for interprocess code. Now that I'm looking more closely, boost::asio::io_service::run_until() uses const chrono::time_point< Clock, Duration > & abs_time, and interprocess_condition::timed_wait() uses const boost::posix_time::ptime & abs_time.
Boost version: 1.86.0
OS: Linux, Ubuntu 22.04
I'm used to using
boost::posix_time::microsec_clock::local_time()
orstd::chrono::steady_clock::now()
as my time base for most boost timed wait functionality. However, it seems thatinterprocess_condition::timed_wait()
returns false immediately for me when I have a time 1 second in the future (I am in UTC-7 time zone). Things start to work fine if I either adjust my system time to UTC+0 or update the code to instead useboost::posix_time::microsec_clock::universal_time()
as my time base.The text was updated successfully, but these errors were encountered: