title: C++ 11 alternative pthread_cond_timedwait
body: <p>I need to make a thread waiting until either</p>
  
  <ul>
  <li>a timeout is expired, or</li>
  <li>a variable is changed by another thread</li>
  </ul>
  
  <p>After some research I've found out pthreads got  <strong>pthread_cond_timedwait</strong> which could be useful in this case if I'd be using pthreads.</p>
  
  <p>I'm using C++ 11 threads instead. Is there a suitable alternative for me without completely passing to pthreads?</p>