Applescript Calculate Run Time of a Command How would you calculate the time it took to run a command? Specifically, I want to know the time it takes to return a value in a Shell command. I wrote this up, would it work? (Psuedocode)

a=currentTime
[command]
b=currentTime
print b-a


If translated into Applescript would this work? Is there a better way to do this when calculating the runtime of a shell command (the command is run via do shell command)?
It’s not AppleScript, but is there a reason why the time command isn't applicable?  It’s used like this:

time &lt;command&gt;
time find /opt
time tar xf bigFile.tar.bz2


It gives output like this:

real    0m0.044s
user    0m0.000s
sys     0m0.008s