Questions tagged [delayed-execution]

Delaying the execution of a program or a procedure by a given amount of time, or until the results are explicitly requested.

Delaying the execution of a program or a procedure by a given amount of time, or until the results are explicitly requested.

279 questions
0
votes
3 answers

Decorator storing input in list to call every `n` calls?

How do I write a decorator that stores input for that function in a list and only calls the function after n is stored?
0
votes
1 answer

Delayed save in ActiveRecord

Shortly: is there a standard Rails functionality to mark a model instance for delayed save (e.g. m.delay_save!) and then save all marked models by single call (e.g. DelaysManager.commit!)? Verbosely: Consider use case: I need to update a instance of…
Alexey
  • 9,197
  • 5
  • 64
  • 76
-1
votes
1 answer

how to unit test coroutine with multiple delay functions

I followed https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-test/ , looks like runBlockingTest is skipping the delay coroutine and I’m not able to reach the code after delay from main function. Is there a good way unit test/advance the…
-1
votes
1 answer

swift loop delay not working properly

I am trying to animate an UIImageView to move across the screen. In order to make the motion smooth, I need to use about 60 increments. The code works well for increments 0-10 with each new increment happening after one second pause. However, for…
Delph2
  • 119
  • 1
  • 9
-1
votes
1 answer

PIC12F675 set timer function . What exactly it does

Please explain the set timer function in this code. Also what it does and what is the number 60535 used with set timer function. case 0: if (int_innercount == 0) { output_low(PIN_B5); output_low(PIN_B6); …
-1
votes
2 answers

Android - Delay method call

What is the best way to delay a method call without freezing the UI or running of the program? I want to display circles on the screen every 5 seconds but in those 5 seconds, other existing circles will be changing size so the drawcircle method has…
Sygnerical
  • 231
  • 1
  • 3
  • 12
-1
votes
2 answers

How to run a function during a limited time?

I've a function and would like to call here each 2 seconds during 3 seconds. I tried timer.performwithDelay() but it doesn't answer to my question. Here is the function I want to call each 2 secondes during 3 seconds : function FuelManage(event) …
Mehmet Ait Addi
  • 135
  • 1
  • 12
-2
votes
2 answers

Saving instructions for later evaluation, possible?

I want to save "instructions" for how a value should be determined at a later time, instead of saving the actual value at the current time. Is this even possible? A simple C# example: int[] myArray = new int[2]; Dictionary myDictionary…
Sebastian Norr
  • 7,686
  • 2
  • 12
  • 17
-2
votes
1 answer

How can I set delay for running functions

I have javascript for call 2 function for example: system.library.myscript.function1(); system.library.myscript.function2(); I would like to set delay before run function2 for example 20 seconds. Highly appreciated for anything helps.
1 2 3
18
19