in reply to time it took script to complete

The $^T var contains the starttime of the script. So to compute the runtime, it is enough to do:
time - $^T.
Boris