title: How to set maximum execution time for a Promise await?
body: <p>How would you wait for a Promise to resolve/reject, for a maximum execution time ? The code below is obviously wrong, it's just to explain what I'm trying to achieve. I'm clueless.</p>
  
  <pre><code>await doSomething();
  if ( executionTime &gt; maxExecutionTime ) {
      doSomethingElse();
  }
  </code></pre>
  
  <p>This is not for a bluebird promise.</p>