Script Execution Timing Tutorial for Ajax Server Calls

Learn to accurately time server script execution in both JavaScript HTML applications and ActionScript 3.0 in Flash applications. Since both languages are so very similar we do not have to change any of the essential code to make the script execution timing possible in both scenarios. We create variables that access the Date() object, then we get total milliseconds since time in the computing world began. Doing this once at the top of your code then once again at the end of your script, you then get how many milliseconds pass while your script runs if you subtract the first variable from the second. <script> function anyFunction(){ // getTime() - returns local total milliseconds for // the date object referenced from Jan 1, 1970 var ms = new Date().getTime(); // Run chunky JavaScript or server Ajax calls to PHP here var execTime = (new Date().getTime() - ms) / 1000; alert(execTime); } anyFunction(); </script>

JavaScript Videos

Date and Time Programming

Digital Clock Tutorial Custom Animated ClockCountdown Timer Tutorial setTimeout clearTimeoutDate Time Countdown Tutorial Christmas 2012 DoomsdayScript Execution Timing Tutorial for Ajax Server CallsTV Screen Slideshow Timed Image Rotation Script Tutorial
Top of Page
Home Page
Table of Contents
Donate / Support
Web Hosting
Terms of Use
© 2015 All Rights Reserved