Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_timeout( <nseconds> ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_TIMEOUT( <nSeconds> )


Parameters

<nSeconds>
Timeout value in seconds. Valid settings are 0 to 9999 seconds.


Returns

Current timeout value, in seconds.


Description

Directs NetLib to retry any subsequent attempt to use a file or apply a 
lock until the effort is successful or it times out-that is, until 
<nSeconds> have elapsed.

The commands and functions affected are APPEND BLANK, FLOCK(), 
N_MLOCK(), RLOCK(), N_SETMULTI(), N_SLOCK(), N_USE(), and USE.

You can disable automatic retry by setting the timeout value to zero: 
N_TIMEOUT(0)


Example

N_TIMEOUT(10) // Retry for ten seconds.
IF RLOCK()    // Retry loop until success or timeout.
   @ 24, 0 SAY 'Record locked.'
ELSE
   @ 24, 0 SAY 'Unable to lock record.'
ENDIF



See Also: N_BLIP()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson