Time Delay function by Michael Wright



Delay Function

This is a function (well actually its a sub), that I found on a website, it is by Tim Lasek. It is an easy to use time delay that could come in quite handy.

Here’s the code:

<%
Sub Delay(DelaySeconds)
SecCount = 0
Sec2 = 0
While SecCount < DelaySeconds + 1
Sec1 = Second(Time())
If Sec1 <> Sec2 Then
Sec2 = Second(Time())
SecCount = SecCount + 1
End If
Wend

End Sub
%>


To call the function (sub):

Delay(The delay time)

E.g.


<% Delay(2) %>

I hope this function is of some use to you and please feel free to modify the code further. As always feel free to contact me at michael_wright@lineone.net

One thought on “Time Delay function by Michael Wright

[gp-comments width="770" linklove="off" ]