Questions tagged [timedelay]
225 questions
9
votes
2 answers
Threads in twisted... how to use them properly?
I need to write a simple app that runs two threads:
- thread 1: runs at timed periods, let's say every 1 minute
- thread 2: just a 'normal' while True loop that does 'stuff'
if not the requirement to run at timed interval I would have not looked at…

rytis
- 2,649
- 22
- 27
8
votes
1 answer
for loop being ignored (optimized?) out
I am using for/while loops for implementing a delay in my code. The duration of the delay is unimportant here though it is sufficiently large to be noticeable. Here is the code snippet.
uint32_t i;
// Do something useful
for (i = 0; i < 50000000U;…

LoneWolf
- 83
- 7
7
votes
2 answers
setTimeout in react setState
this.setState(prevState => ({
score: prevState.score + 10,
rightAnswers: prevState.rightAnswers + 1,
currentQuestion: setTimeout(() => {
prevState.currentQuestion + 1
}, 2000)
}))
}
On button click I…

Happy Block
- 79
- 1
- 1
- 4
7
votes
1 answer
Solve ODE in Python with a time-delay
Can anybody give me some advice how to solve an ODE in Python that has a time-delay implemented in it? I can't seem to figure out how to do it using scipy.integrate.odeint. What I am looking for should look like:
# the constants in the equation
b =…

ThePiIsALie
- 71
- 1
- 4
7
votes
1 answer
Delaying a click event with .delay()
I have a button that gets triggered by the click of another button. I want to delay click of the second button for two seconds. I used .delay() but it didn't work.
jq(function() {
jq('a.box').click(function() {
…

Talha
- 350
- 1
- 4
- 19
7
votes
3 answers
Add a decimal millisecond delay to Java code
I want to add a delay of 0.488 ms to my java code. but thread.sleep() and Timer functions only allow a granularity of millisecond. How do I specify a delay amount below that level ?

Aditya
- 195
- 3
- 4
- 12
6
votes
2 answers
Java: a time-delayed queue that de-dupes
G'day everyone,
I have a system (the source) that needs to notify another system (the target) asynchronously whenever certain objects change. The twist is that the source system may mutate a single object many times in a short interval (updates are…

Peter
- 519
- 6
- 15
4
votes
2 answers
Time Delay for operations using WinForm App in c#
I have a problem with a Windows Form Application in C#
Inside This application there is a Tabbed Browser. Now i want that in a loop (where i do some operation to calculate the next url) i could add a delay between AddTab.
I.E
foreach(Urls url in…

Jasper
- 311
- 2
- 5
- 16
4
votes
3 answers
Adding a delay before keyup() fires in jQuery
I have read through some of the suggested questions but I am not sure exactly how to implement them:
(jquery/js) - get text from field on keyup, but with delay for further typing
How to delay the .keyup() handler until the user stops typing?
How to…

Seany84
- 5,526
- 5
- 42
- 67
4
votes
4 answers
Alternative ways of calling javascript code sequentially with delays in between
I have this code originally in python.
SendSerialPortCommand("XXX")
time.delay(0.5)
SendSerialPortCommand("YYY")
I converted this code to node.js but the code looks much uglier.
SendSerialPortCommand("XXX");
setTimeout(function () {
…

guagay_wk
- 26,337
- 54
- 186
- 295
4
votes
2 answers
JavaFX 8: how to add a timedelay to a listener?
I'm working on an JavaFX 8 app right now, where i have a tableView and some textFields above which make it possible to search/filter for certain columns in the tableView. I have added a listener to the textFields, to trigger the filtering…

benkenobi26
- 39
- 1
- 4
3
votes
1 answer
Error delay differential equation deSolve (dede)
I am writing a delay differential equation in deSolve (R), and I am getting an error message I am unsure how to solve.
So for some background. I have a system with 12 differential equations, and 3 of those have a delay. I was successful in writing…

Laura
- 35
- 5
3
votes
3 answers
JavaScript onKeyUp time delay
I need some help with a JavaScript function that I call onKeyUp, it is a Ajax function but every time I write any character it calls the function and it slow the page performance and it check every time, it is an user check with the database.
I…

apz2000
- 132
- 6
- 14
3
votes
2 answers
UNCalendarNotificationTrigger not initiating
Okay - I am totally frustrated with this piece of code right now and ready to give up! Basically when simulating to either Simulator or actual device I get the requestAuthorisation to work no problem but the trigger does not initiate ever. I have…

ST101
- 55
- 1
- 6
3
votes
1 answer
How to apply dead-time from FOPDT model to a Manipulated Variable in MPC gekko
I'm trying to build a MPC model with previously estimated values of k, tau and theta in a FOPDT equation. I implemented this sugestion to estimate the dead-time using cspline: How to estimate theta value in FOPDT equation using gekko?.
However, I…

Daniel Baptista
- 103
- 5