home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
trl14db.zip
/
TRLPRG.EXE
/
DELAY.PRG
< prev
next >
Wrap
Text File
|
1990-10-22
|
1KB
|
44 lines
***********
* DELAY.PRG
* by Tom Rettig and Leonard Zerman
* Placed in the Public Domain by Tom Rettig Associates, 10/22/1990.
*
* SYNTAX: DO DELAY WITH <seconds>
* RETURN: <expN> INKEY() keypress value used to exit
* NOTE : This routine is a timeout loop in number of
* seconds. If the time out is more than 24 hours,
* the delay defaults to 24 hours with no override.
***********
PARAMETERS waittime
PRIVATE tr_temp,tr_temp2
* If waittime is greater than 24 hours.
IF waittime > 86400
waittime = 86400
ENDIF
* Convert current time to seconds.
tr_temp = TIME()
CALL trpass WITH tr_temp
CALL trexe WITH "TSTOS"
* Add waittime to current time and convert back to time string.
waittime = waittime + tr_retn
CALL trpass WITH waittime
CALL trexe WITH "TIMESTR"
* Delay loop.
tr_temp = 0
CALL Trexe WITH "TRRETCLEN"
tr_temp2 = SUBSTR(tr_retc,1,tr_retn)
DO WHILE (TIME() # tr_temp2) .AND. (tr_temp = 0)
temp = INKEY()
ENDDO
tr_retn = tr_temp && return inkey value used to exit
IF fox
RETURN (tr_retn)
ENDIF
* eof delay *