Questions tagged [delay]

Delay refers to amount of time between two events.

A delay is simply the difference in time between two events.

This may refer to the start and stop of a single event (e.g. data processing delay) or the execution of two separate, independent events.

A delay may be manually implemented by the programmer using sleep or pause functions common in many programming languages.

In the case of computer networks, delay between sending and receiving of data packets is referred to synonymously as latency.

4215 questions
8
votes
2 answers

Delay to next function in method chain

I am trying to learn more about Method chaining in Javascript and would like to know the proper way to create a delay with no jQuery to the next function in the chain: var foo = function() { this.delay = function(per) { setTimeout(start,…
user1982408
  • 337
  • 1
  • 3
  • 8
8
votes
3 answers

jquery each add class with delay inbetween

I need to loop through each div .row to add or remove a flip class that has a CSS3 3D transform effect. When I apply this add/remove class to each ".row" with jquery each(), all the divs get the class ".flip" added or removed at the exact same time.…
Brandon Waring
  • 103
  • 1
  • 1
  • 6
8
votes
2 answers

Applying delay between iterations of javascript for loop

Is it possible to apply a delay to successive iterations of a javascript for-loop using jQuery or underscore? I have a for-loop on my page that I am using to pop up growl notifications when users fulfill certain conditions and if there are multiple…
jaimerump
  • 882
  • 4
  • 17
  • 35
8
votes
3 answers

Trying to add delay to jQuery AJAX request

I am trying to delay an AJAX request so that it is sent out 2-3 seconds after the LAST keyup of an input cell. So far I have managed to delay the requests, but after 2-3 seconds I get one request sent for every keyup in the field... How can I make…
krasatos
  • 1,177
  • 3
  • 13
  • 26
8
votes
1 answer

Thread delay and keyboard events in OCaml

Here is a simple game loop in OCaml. The state is displayed, input is received, and the state is advanced. The number of frames per second is contrained to 40 by delaying the thread for 0.025 seconds each loop. main.ml: let rec main (* state *)…
Matthew Piziak
  • 3,430
  • 4
  • 35
  • 49
8
votes
3 answers

set a delay in libgdx game

i have a game(like super jumper, this game is a jumping game) that our character has life. after collision with enemies, his life reduce. and i want to after 1 sec , calculate the collisions. i mean in this 1 sec, if my character contact with…
Hosein
  • 475
  • 2
  • 7
  • 21
7
votes
5 answers

Executing an exec() or system() in PHP and do not wait for output

I want to trigger a shell command in eider exec() or system() from PHP script but it is a task that take a while to complete, is there a way to trigger it and continue running the PHP page load without delay? Edit: I am on CentOS 6, PHP 5.3
adrianTNT
  • 3,671
  • 5
  • 29
  • 35
7
votes
0 answers

How to properly test infinite coroutine loop with delay

I have a coroutine function that runs infinitely and makes an API call every 8 seconds. I am trying to test it but something feels wrong. Here is the code: class RefreshStocksUseCaseImpl( private val dispatcherProvider: DispatcherProvider, …
Miltos
  • 166
  • 3
7
votes
2 answers

Objective C - Cross-correlation for audio delay estimation

I would like to know if anyone knows how to perform a cross-correlation between two audio signals on iOS. I would like to align the FFT windows that I get at the receiver (I am receiving the signal from the mic) with the ones at the transmitter…
Kal
  • 71
  • 2
7
votes
0 answers

Gatsby Link has delay on click

I'm working with Gatsby.js Everything was pretty nice since I've started building the menu. When I clicked the Link component I've waited for about 2 seconds and then I was redirected to the next page. The weird thing is that the URL is changing…
7
votes
1 answer

android delay using handler

I want to display a couple of images and add a delay between each image. I did this and have no errors in the code but for some reason the app crashes. Bitmap bitmap = BitmapFactory.decodeFile(imageIn); ImageView myImageView =…
moe
  • 247
  • 3
  • 8
  • 21
7
votes
1 answer

Celery task cannot be called (missing positional arguments) from Django app

Ok I've poured over all the SO posts, Celery docs, etc...and I just cannot figure this out. No matter what I try or how I try to call a task from a Django app, Celery is complaining that I'm not supplying the required parameters. "TypeError:…
David White
  • 81
  • 1
  • 3
7
votes
3 answers

Want to get GPS data at every 5 sec using arduino

I wrote the following codes in Arduino uno with the header file TinyGPSPlus,and uses GPS SKG 13BL(GPS module). #include #include /* This program sketch obtain and print the lati,logi,speed,date and time It…
Mathews Sunny
  • 1,796
  • 7
  • 21
  • 31
7
votes
1 answer

jQuery show/hide - Question about the delay variable

I'm using the following code to show a box when you mouseover a certain div and have set the delay on the fade out but is there some way of cancelling the fadeOut effect if the user goes back on to the div? jQuery("#cart-box").hover(function() { …
Vince P
  • 1,781
  • 7
  • 29
  • 67
7
votes
4 answers

Add delay before sending new ajax request using jQuery

I have a list of links which point to html pages.
gearsdigital
  • 13,915
  • 6
  • 44
  • 73