Millisecond delay (:msleep)
Declaration
te = te:msleep(ms)
Parameters
- ms
Number, optional. Delay time in milliseconds. Default: 0.1.
Returns
- te
Touch event object itself. You can get a touch event object viatouch.on
.
Notes
- Delay function. It does not change the object; it just blocks the current thread. Alias:
:delay
. - This method may yield; before it returns, other threads may get a chance to run.
Example
-- Touch at 100,100, wait 300 ms, then lift
touch.on(100, 100):msleep(300):off()