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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

time delay

Status
Not open for further replies.

Bob2

Programmer
Jul 3, 2000
228
SE
Hi


I wonder if there is anyone that has created a time delay subroutine. I could use a subroutine that delay a page creation with 5 seconds.


Regards

M
 
Have you looked at the SetInterval method and setTimeout method for DHTML or Wscript.Sleep for pure vbscript?

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
Don't worry about it I found this solution..


Function TimeIt(N)
Dim StartTime, EndTime
StartTime = Timer
For I = 1 To N
Next
EndTime = Timer
TimeIt = EndTime - StartTime
End Function
Call TimeIt(5555555)


Regards

M
 
Won't that solution be dependent on the computer's processor speed?

[blue]"Well, once again my friend, we find that science is a two headed beast. One head is nice, it gives us aspirin and other modern conveniences,...but the other head of science is BAD! Oh, beware the other head of science, Arthur; it bites!!" - The Tick[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top