What about 'Sleep' during a specified time on Linux text console
On a Linux text console, can you check if the following program is rightly working?
Waiting for one keypress to print 'one', then automatic delay of two seconds between each next printing (without pressing any key):
it`s almost all fine with the macros, but they sleep "forever".
Any idea to do a macro "timeout" like the DOC says:
"Waits until a specified time has elapsed, or a key is pressed.
Syntax
Declare Sub Sleep ( ByVal amount As Long = -1 )
Declare Function Sleep ( ByVal amount As Long , ByVal keyflag As Long ) As Long" (copied from CHM, "mk:@MSITStore:C:\PRG\FBC\HelpFiles\FB-manual-1.05.0.chm::/KeyPgSleep.html")
Just have a look at my pause(); don´t bother about performance: It is a _sleep_ :)
@FXM:
Your variadic macro works perfectly on Ubuntu.
All the timings worked.
I tested keypresses to bypass the sleep and they all worked as they should have. It ignored the keypress on the last sleep 10000, 1.
I will post a bug report tonight, if someone hasn't already done so. Bug reported
Current problem is that fb linux rtlib was using "is there a key to be read?" as the test for "has a key been hit?"
I changed unix keyboard handler so should behave same as windows console. In this example code, if you press a key during the 5 sec delay at the start the, first SLEEP is passed, but not the second SLEEP. Like in windows.