Link to home
Start Free TrialLog in
Avatar of gemme
gemme

asked on

Wait function in VB5

Is there a wait or sleep function in VB5 that I can use to release the cpu and suspend execution for a period of time?
Avatar of jjbyers
jjbyers

I use the DoEvents and a do loop like this.

Dim EndTime As Date

  EndTime = Format(Now + #12:00:10 AM#, "long time")
  Do Until Format(Now, "long time") > EndTime
    DoEvents
  Loop

Hope this helps.
ASKER CERTIFIED SOLUTION
Avatar of jmnolan
jmnolan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gemme

ASKER

Thanks I will try this.
DoEvents()
Check it out in vbhelp