Measuring time of execution on method
<p>Let's say we have this:</p>

<pre><code>function myMethod1() {
    ...
}
</code></pre>

<p>and later in the code:</p>

<pre><code>myMethod1();
alert('myMethod1() was executed!');
</code></pre>

<p>I need to set timeout for the alert so that it will be called after myMethod1() executes. But how do I know the value of the second parameter for the setTimeout function? How do I measure the time needed for myMethod1() to execute?</p>

<p>MyMethod1() has an async ajax call.</p>
