[INCLUDE]
DoEventsEx_GetTickCount

[CODE]
Public Function DoEventsEx_IsTickCountElapsed(ByVal FirstTickCountValue As Long, ByVal TimeIntervalMs As Long) As Boolean
  Dim xLong1 As Long

  If FirstTickCountValue = 0 Then
    DoEventsEx_IsTickCountElapsed = True
    Else
    xLong1 = GetTickCount And &H3FFFFFFF
    If xLong1 < FirstTickCountValue Then
      DoEventsEx_IsTickCountElapsed = (xLong1 + &H40000000 > FirstTickCountValue + TimeIntervalMs)
      Else
      DoEventsEx_IsTickCountElapsed = (xLong1 > FirstTickCountValue + TimeIntervalMs)
      End If
    End If
  End Function
