Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

script internal timer

Status
Not open for further replies.

DANZIG

Technical User
Mar 8, 2001
142
US
Hellos,

I'm getting ready to write something to do a few simple taks on a local system and am needing to have an in script timer setup that can be instanced. I'm needing to say not the time in (miliseconds) it took from the command to the launch of the application, the time from the launch to the redirection of the application ect.

Any ideas out there?

I've looked at loops with an index/delay built in but the problem with that is that our stuck in the loop.




Thanks, Danzig
 
sorry i dont get what you are trying to achieve.
can you post code to demonstrate your dilema?
 
If you simply want to pause execution of a script, use WScript.Sleep.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
If you are looking to tell the time between when a process starts and when it ends set a variable just before starting the process and then again when the process ends and then use the Datediff function to calculate the difference between the two times.

startime = time
command starts
command ends
endtime = time
timeDiff = DateDiff("n", dtmToday & " " & StartTime, dtmToday & " " & EndTime)

Hope that helps
 
Well I need the returns in fractions of seconds, but the vbscript timer function looks like it may be the best route.


Thanks, Danzig
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top