NAP will allow you to sleep a number of milliseconds.

-----Original Message-----
From: Glenn W. Paschal [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 27, 2004 2:45 PM
To: [EMAIL PROTECTED]
Subject: RE: [U2] Timed INPUT [UV]

I found this intriguing, so I decided to see if I could write my own
"INPUTWAIT" subroutine.
Found only one problem.

I am using a combination of INPUT BUF.TEST,-1 and INKEY() to capture input
and test for timeouts.
If I put a sleep in the INPUT BUF.TEST,-1 loop, the process becomes quirky
and delayed. (SLEEP 1)
If I take out the sleep, it works smooth and precise, but eats up resources
like a madman! (result of sit-n-spin loop).

Is there a way to sleep less than 1 sec?  Seems like at one time you could
specify sleep in milliseconds rather than seconds.

(writing in UniVerse 10.1.0 on Win 2000 svr)

Thanks,
Glenn W. Paschal
PasTech LLC
Computer Consulting
ph. (931) 526-9631
fx. (931) 526-9678
email. [EMAIL PROTECTED]
web. www.pastech.net
 
 


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jan Shaw and Keith
Johnson
Sent: Thursday, May 27, 2004 4:09 AM
To: U2-Users
Subject: Re: [U2] Timed INPUT [UV]


I've sent it in before, but I put the whole thing up on Pickwiki.  Following
is the note I put about it.
***********************
Here's a subroutine to mimic the INPUT WAITING capability that exists in
Unidata. It has all the functionality including duplicating the behaviour of
the underscore and colon when specifying the maximum string length. For
example, if you want to input three characters for variable THIS, waiting
for 10 seconds, requiring a carriage return to signify input but without a
line feed, and defaulting to the string "zip"; you would code:

CALL INPUTWAIT(THIS, '3_:', '10', 'zip' )
***********************

Which in Unidata would have been

INPUT THIS,3_: FOR 10 ELSE THIS = 'zip'

So you can save time by getting the code from

http://www.pickwiki.com/cgi-bin/wiki.pl?InputWait

Regards, Keith Johnson

Owner/Host

www.emeraldglenlodge.co.nz
04 299 3066
-------
u2-users mailing list
[EMAIL PROTECTED] http://www.u2ug.org/listinfo/u2-users
-------
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users


NOTICE OF CONFIDENTIALITY: The information contained in this transmission,
and in any accompanying documents, constitutes confidential information
belonging to Heritage Information Systems, Inc.  This information is
intended only for the use of the individual or entity named above.  If you
are not the intended recipient of this transmission, you are hereby notified
that any disclosure, copying, distribution, or the taking of any action in
reliance of this information, is strictly prohibited.  If you have received
this message in error, please immediately notify us by telephone, at
804-644-8707 to arrange for its proper destruction.  Thank you.
-------
u2-users mailing list
[EMAIL PROTECTED]
http://www.u2ug.org/listinfo/u2-users

Reply via email to