FUNCTIONS CORE

SecondsSleep()

Suspend thread execution for a number of seconds

Syntax

Signature
SecondsSleep( nSeconds ) --> NIL

Arguments

nSeconds

Example

SecondsSleep.prg
PROCEDURE Main()

   LOCAL nStart := Seconds()

   SecondsSleep( 0.5 )

   Check( 'Round( Seconds() - nStart, 2 ) >= 0.5 ', Round( Seconds() - nStart, 2 ) >= 0.5, .T. )

RETURN

STATIC PROCEDURE Check( cTitle, xResult, xExpected )

   QOut( cTitle + IIF( xResult == xExpected, "OK", "ERROR" ) )

RETURN

Output

Round( Seconds() - nStart, 2 ) >= 0.5 OK