How to get execution time of an AppleScript? I have seen some more advanced AppleScript users mention efficiency of their AppleScripts in terms of execution time.
Is there an AppleScript method for getting the execution time?
I know there is time when calling do shell script. I have this working in a loop:
set googURL to (do shell script &quot;{ time googler --np -n 1 -w imdb.com &quot; &amp; movie_title &amp; &quot; &quot; &amp; movie_year &amp; &quot; | grep https | sed -e 's/^[ \t]*//' ; } 2&gt;&gt; ~/Desktop/time.txt&quot;)

(on a side note I couldn't figure out how to get the output of the time command to output to Replies, it was being interpreted as part of the grep command)
I want to get the time it takes to execute the entire AppleScript.
Here is one AppleScript solution that you may be interested in.
set startTime to current date

-- Your Code Here

set timeTaken to ((current date) - startTime as string) &amp; &quot; Seconds&quot;

activate
display alert &quot;Script Timer&quot; message &quot;Running This Code Took &quot; &amp; ¬
    timeTaken buttons {&quot;OK&quot;} giving up after 5

This is just a general solution which will return the value in seconds (whole).  This will not return fractions of seconds.