SUB Delay (Value as integer)
t! = timer
do: loop while timer - t! < Value
end sub
When I use under .5 it doesn't work and I need a delay that
works for say .2 secs or so.
grtz
Seb
I know why you're here. I know what you've been doing... why you hardly sleep, why you live alone, and why night after night, you sit by your computer...<br>
Unfortunately, no one can be told what Qbinux is. You have to see it for yourself.
SUB Delay (Value as integer)
t! = timer
do: loop while timer - t! < Value
end sub
When I use under .5 it doesn't work and I need a delay that
works for say .2 secs or so.
grtz
Seb
Looking at your code, I notice that "Value" is an integer. Therefore, it will never work for .5 nor for .2 or other value with decimals.
Try it with "Value" as single.
Considerations:
* TIMER is incremented every 1/18 of a second, which should allow you to test for time differences up to .055 seconds (55 ms.).
* Please be aware that the value of TIMER will get reset to zero at midnight, which could screw up your test if you're operating near midnight.
*****
If you are ahead of me, lead.
If you are behind me, follow.
If you are not doing anything,
Get out of the way.