robszar
-
Total Posts
:
193
- Scores: 0
-
Reward points
:
0
- Joined: 2/27/2005
- Location:
-
Status: offline
|
time a script
Monday, May 16, 2005 8:45 AM
( permalink)
is there a way to time a script, get the time in the begining and end subtract the difference?
|
|
|
|
Country73
-
Total Posts
:
754
- Scores: 10
-
Reward points
:
0
-
Status: offline
|
Re: time a script
Monday, May 16, 2005 9:27 AM
( permalink)
sStart = NOW 'beginning of your script sFinish = NOW 'end of your script sTotal = sFinish - sStart wscript.echo sTotal
|
|
|
|
didorno
-
Total Posts
:
361
- Scores: 0
-
Reward points
:
0
- Joined: 2/12/2005
- Location:
-
Status: offline
|
Re: time a script
Monday, May 16, 2005 9:33 AM
( permalink)
There are a lot of functions with dates and time to manipulate with within VBScript. You can use f.i. the next code at the start of the script.
StartTime = Now
At the end of the script you can use
WScript.Echo DateDiff("s", StartTime, Now) where "s" gives the difference in seconds. Good luck !
|
|
|
|
didorno
-
Total Posts
:
361
- Scores: 0
-
Reward points
:
0
- Joined: 2/12/2005
- Location:
-
Status: offline
|
Re: time a script
Monday, May 16, 2005 9:41 AM
( permalink)
Country73, I didn't saw your post until I sended mine. In your proposal I get a rather ugly difference format. robszar, if you like to have a difference expressed in a different unit : minutes : n hours : h days : d months : m Good luck !
|
|
|
|
robszar
-
Total Posts
:
193
- Scores: 0
-
Reward points
:
0
- Joined: 2/27/2005
- Location:
-
Status: offline
|
Re: time a script
Monday, May 16, 2005 3:40 PM
( permalink)
|
|
|
|