title: Calculate function execution time
body: <p>Suppose I have called a function as,</p>
  <pre><code>const data = await someFunction()
  </code></pre>
  <p>I want to calculate execution time of this function.</p>
  <p>For this I tried as,</p>
  <pre><code>let startTime = Date.now();
  const data = await someFunction()
  let endTime = Date.now();
  </code></pre>
  <p>And I calculated difference between endTime-startTime and the result I get i think is in millisecond and converted it to second.</p>
  <p>I would like second opinion on this whether this is one of the option to calculate or is there some more better method which can give me execution time in second.</p>