• Welcome to Valhalla Legends Archive.
 

Packets

Started by TriCk, September 13, 2003, 06:01 AM

Previous topic - Next topic

Lenny

Quote from: eRRoR on September 14, 2003, 12:35 AM
Just use this to wait when you receive 0x25.

Sub Pause(ByVal fSeconds As Single, Optional ByVal AllowEvents As Boolean = True)
   Dim fTimer As Single
   If AllowEvents Then
       fTimer = Timer
       Do While Timer - fTimer < fSeconds
           Sleep 100
           DoEvents
           If Timer < fTimer Then
             fTimer = fTimer - 86400
           End If
       Loop
   Else
       Sleep fSeconds * 1000
   End If
End Sub

This code gives an extra 300ms delay when used as opposed to Sleep.

can some1 this code to me?
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

Lenny

Nvm just found out that Timer was internal clock seconds from midnight......
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.