title: How to cast `std::chrono::milliseconds` to `boost::posix_time::milliseconds`
body: <p>I am using a boost::asio::deadline_timer like so to set some timeout before an <code>async_read</code> operation on a <em>tcp socket</em>. I am using <em>boost 1.61</em>.</p>
  
  <pre><code>long time_out_millis = 2000;
  boost::asio::deadline_timer theTimer(theSocket.get_io_service(), boost::posix_time::milliseconds(time_out_millis));
  </code></pre>
  
  <p><strong>Problem:</strong><br>
  Other parts of my code use <code>std::chrono::milliseconds</code>. I want use <code>std::chrono</code> instead of the <code>"long time_out_millis"</code> &amp; if possible use <code>std::chrono::milliseconds</code> instead of <code>boost::posix_time::milliseconds</code>. How can I do that?</p>
  
  <p><strong>Question:</strong><br>
  So, how can I use <code>std::chrono::milliseconds</code> here ? Is there a way I cast from <code>std::chrono::milliseconds</code> to <code>boost::posix_time::milliseconds</code> ?</p>