option explicit dim t_start, t_end t_start = timer msgBox "Press OK when done" t_end = timer wScript.echo "Elapsed time in seconds: " & formatNumber(t_end - t_start, 1)
timer
returns the number of seconds since the most recent midnight. Thus, if the script ends not on the same day that it is started, the reported number of seconds will be wrong.