Synchronize script method with the help of another method
<p>i have 2 scripts</p>

<pre><code>script1(){
   // takes very long time
}


script2(){
   // takes less time
}
</code></pre>

<p>i want to synchronize these method but with the help another method...
cannot modify script1 and script2..</p>
