How to get execution time of an 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) & " Seconds"
activate
display alert "Script Timer" message "Running This Code Took " & ¬
timeTaken buttons {"OK"} 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.