title: How fast / efficient is Bluebird's timeout?
body: <p>The following example times out in most cases (outputs <code>timed out</code>):</p>
  
  <pre><code>Promise = require('bluebird');
  
  new Promise(resolve =&gt; {
      setTimeout(resolve, 1000);
  })
      .timeout(1001)
      .then(() =&gt; {
          console.log('finished');
      })
      .catch(error =&gt; {
          if (error instanceof Promise.TimeoutError) {
              console.log('timed out');
          } else {
              console.log('other error');
          }
      });
  </code></pre>
  
  <p>Does this mean that the Bluebird's promise overhead takes longer than 1ms?
  I see it often time out even if I use <code>.timeout(1002)</code>.</p>
  
  <p>The main reason for asking - I'm trying to figure what the safe threshold is, which gets more important with smaller timeouts.</p>
  
  <hr>
  
  <p>Using Bluebird 3.5.0, under Node.js 8.1.2</p>