<-- Previous || Up || Next -->

True Every N Seconds Function
Basic Extensions Class

Public Function TrueEveryNSeconds( _
    Optional ByVal vSeconds As Variant _
    ) As Boolean

Return True once every N seconds, and also
Return True the first time this function is called.

Example:
    TrueEveryNSeconds(0) : SleepBlocking(3.5) : ? TrueEveryNSeconds(5) : SleepBlocking(3.5) : ? TrueEveryNSeconds(5)
    False
    True
See also:
    TrueEveryNCalls Function
vSeconds: The number of seconds that must have elapsed before the function will return True. It is the number of seconds that must have elapsed since either 1) this function was first called, or 2) the function last returned True. vSeconds default to 0 (zero) if it is missing or Null or cannot be fixed up to a number, meaning that the function will return True and reset the start time.
Warning: This function calls the Visual Basic Timer function to determine if the specified number of seconds have elapsed since the function last returned True. vSeconds is generally be accurate to 1/18 of a second because of this.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.