title: Difference between mutex.timed_lock(duration) and boost::timed_mutex::scoped_lock scoped_lock(mutex, duration)
body: <p>I would like to know which is the difference between:</p>
  
  <pre><code>boost::timed_mutex _mutex;
  if(_mutex.timed_lock(boost::get_system_time() + boost::posix_time::milliseconds(10))){
     exclusive code
     _mutex.unlock();
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>boost::timed_mutex _mutex;
  boost::timed_mutex::scoped_lock scoped_lock(_mutex, boost::get_system_time() + boost::posix_time::milliseconds(10));
  if(scoped_lock.owns_lock()) {
     exclusive code
  }
  </code></pre>
  
  <p>I do know already that the scoped_lock makes unnecessary the call to unlock. My question refers to: </p>
  
  <ol>
  <li>Why in the first case we call timed_lock as member function of a
  mutex and in the second one we construct a lock from a mutex and a
  duration. </li>
  <li>Which one is more efficient? </li>
  <li>The usage of boost::posix_time is okay or is recommended to use another kind,
  e.g. chrono or duration? </li>
  <li>There's a better way (faster) to try to
  acquire a lock for 'x' time than the two methods above specified?</li>
  </ol>