There may be a lot of extensions and approaches are available to provide delay in execution of desired procedures. The DelayHandler extension may look similar to others’, but it is definitely different.
The blocks of the extension ‘DelayHandler’ are…
We can use the functions at any stage of app coding like this…
For delay in milli seconds,
For delay in seconds,
For delay in minutes,
After execution of every instance of any delay function, the method AfterDelay will be invoked and the procedures append to that delay instance processed…
Try and feel the definite difference with the other extensions. That’s it.
Download the resources here:
Use this extension and feel free to suggest the improvements.
Thank you
Hema Srinivas
India
22.07.2020
P.S.
This extension is very useful in making apps for IoT with Arduino, ESP, Raspberry PI and many other embedded hardware.
Try and feel the difference.
30 Likes
Nice job. But I didn’t understand the use of this extension. Is it similar to clock component’s timer?
2 Likes
Just try the extension, then you can feel the difference.
It provides different delays to execute different procedures, this helps in parallel processing.
If you have touch in programming embedded systems, then you can feel the essence of this extension.
3 Likes
The same question:
Is there a difference in the accuracy with which this extension works compared to the Clock component?
Because the clock is very imprecise, see for example here:
I’m going to create a new extension that counts down or up seconds (or ms), but also displays the duration / time in the date format (eg: HH:mm:ss).
The special thing is that the extension does not use a clock and / or does not work with the java countdownTimer, but catch and displays the time in real time. In this way, the countdown / count up does not lose a single millisecond regardless of how long the period is.
The extension (in which I was supported by @Red_Panda with regard to some spe…
2 Likes
Yes it is precise. Try it with any code.
1 Like
Automate_My_Project:
Yes it is precise.
I did a first little test (a 5 min countdown):
The accuracy is actually better than with the clock. In a 5 minute countdown, the extension only loses a little more than 1 second compared to a chronometer.
Of course, that’s not the purpose of your extension, it was just a small test to see what the extension can be used for.
If the .AfterDelay
event is not triggered regularly (excessively often), the delay seems to be quite precise.
2 Likes
Smaug
( )
July 22, 2020, 7:37am
8
Wow, thank you so much for making such a useful extension. I was looking for something like this.
Thank you very much for your analysis.
Please say your conclusion. I am eager to hear that.
2 Likes
As I said before, for the purposes you presented, it seems to work well and give better / more accurate results than the clock component.
Note : The extension doesn’t work in the background (idle / sleep mode or after pressing the Home button).
1 Like
Thank you.
I try to make this extension run in background.
3 Likes
Very nice extension. I am searching for this type of delay program for a long time. Keep koding!
1 Like
yusufcihan
(Yusuf Cihan)
July 22, 2020, 12:39pm
14
So is it something like wait()
function? See Taifun’s reply here:
Not like that.
You can check it with other extensions, compare and then conclude.
1 Like
This is such a helpful extension, thanks very much; it will help to clean up my code a lot!
2 Likes
froniu84a
(Patryk F)
August 22, 2020, 1:54pm
18
Is this Delay Synchronous or Asynchronous?
vknow360
(Sunny Gupta)
August 22, 2020, 1:59pm
19
wait()
is a synchronous method if I am not wrong.
1 Like
nikzdevz
(nikzdevz)
August 23, 2020, 8:16am
20
A great extension but can you add a block by which we can call any delay by its name…
1 Like