Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Latest posts

How Can I Determine How Long It Takes a Script to Run?
Aug 18, 2004
Post comments count 0
Post likes count 0

How Can I Determine How Long It Takes a Script to Run?

ScriptingGuy1
ScriptingGuy1

Hey, Scripting Guy! Is there a good way to time how long it takes for a script to run? -- BN, Montreal, Canada Hey, BN. Probably the easiest way to do this is to let the script time itself. To accomplish that feat, set the first line of the script to this: This code simply sets the value of the variable dtmStart to the current date and time. Now, make the last two lines of the script look like this: What does that do for us? Well, now we’ve saved the time the script began and the time the script ended. To determine how long it took for the script to run, we just need to subtract the beginning time from ...