Is there any way that I can time the duration of an applescript subroutine? I’m looking for a way of timing a selection of filesystem events running one after another as part of a network performance testing suite.
If it could return the time duration as a variable, all the better.
Thanks in advance!
Model: Powerbook Titanium 800
Browser: Firefox 1.0.3
Operating System: Mac OS X (10.4)
set StartTime to current date
set EndTime to current date
set SubRoutineTimeDuration to (EndTime - StartTime)
read (choose file)
Get the date, run the routine, and get the date again. Subtract end time to start time to get duration. The return is in seconds. Here is a post on returning fractions of seconds: