dimanche 1 mai 2016

CallSubPlus - CallSub with explicit delay

In many cases you need to run a task in a few seconds. The solution for such cases is to create a timer and then execute the task in the timer's Tick event. This is good for a single task. However if you need to run multiple tasks then it becomes difficult to maintain.

This small class makes it much simpler. You just need to call CallSubPlus with the target sub and the delay.
Internally it uses a (one shot) timer together with CallSubDelayed or CallSub.

There are four methods:
CallSubPlus,...

CallSubPlus - CallSub with explicit delay

from B4X Community - Android, iOS, desktop, server and IoT programming tools http://ift.tt/26GCcUe
via IFTTT

Aucun commentaire:

Enregistrer un commentaire