Not sure if I'm missing something, but how can I pass a boost::posix_time::ptime
object to boost::this_thread::sleep_until()
? More specifically: How can I convert from boost::posix_time::ptime
to boost::chrono::time_point
?
void do_magic( const boost::posix_time::ptime& wakeup_time )
{
boost::this_thread::sleep_until( wakeup_time ); // not working
do_more_magic();
}
I'm using boost version 1.62
, if that is of any relevance.