title: How to sleep with boost::chrono?
body: <p>Examples of <code>boost::this_thread::sleep()</code> seem to use objects of <code>boost::posix_time::milliseconds</code>.  I've tried that and it works, but I am using <code>boost::chrono</code> for checking the system clock etcetera.  It seems to me I should be able to pass <code>sleep()</code> a <code>chrono::duration</code> like this:</p>
  
  <blockquote>
    <p>boost::this_thread::sleep( boost::chrono::duration(10) );</p>
  </blockquote>
  
  <p>But the compiler is giving me the following error:</p>
  
  <blockquote>
    <p>... boost_1_49_0\boost/thread/win32/thread_data.hpp(171) : error C2039: 'total_milliseconds' : is not a member of 'boost::chrono::duration'</p>
  </blockquote>
  
  <p>Which I find confusing.  Am I right in thinking I should be able to do this?  Will it be necessary to convert to a <code>posix_time</code>?</p>