Quite often it’s useful to have some idea how long scripts are taking to run. A simple way to do that is to use the Timer() function in VBscript.
Near the start of your script record the current value returned by Timer():
'Timestamp at the start of the script startTime = Timer()
and then near the end take it again:
'Timestamp at the end of the script endTime = Timer()
You can then work out how long the script took to run between these two points is milliseconds by using:
' Work out how long it took Duration = Int((endTime-startTime)*1000)
which of course you can then output on completion:
context.SetResult 0,"Completed Successfully. (Script took " & Duration & " ms)"