title: What is asynchronous processing when using setTimeout?
body: <p>When connected by serial, 'open' event occurs immediately, but if setTimeout is added, it will delay by that time. How can I fix this?</p>
  
  <pre><code>const Serialport = require('serialport');
  
  class Serial {
    connect() {
      const client = new Serialport('COM2', {
        autoOpen: false,
      });
  
      console.time('Complete Connect');
      client.open(err =&gt; {
        console.timeEnd('Complete Connect');
      });
    }
  }
  
  const serialport = new Serial();
  serialport.connect();
  
  setTimeout(() =&gt; {
    console.log('any work');
  }, 3000);
  </code></pre>
  
  <p>prints:</p>
  
  <pre><code>1. any work
  2. Complete Connect: 3025.978ms
  </code></pre>