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
93
votes
7 answers

CSS Animations with delay for each child element

I am trying to create a cascading effect by applying an animation to each child element. I was wondering if there is a better way to do it than this: .myClass img:nth-child(1){ -webkit-animation: myAnimation 0.9s linear forwards; } .myClass…
Seka
  • 1,413
  • 2
  • 12
  • 16
88
votes
7 answers

Adding delay between execution of two following lines

I need to add a delay between the execution of two lines in a(same) function. Is there any favorable option to do this? Note: I don't need two different functions to do this, and the delay must not affect other functions' execution. eg: line 1:…
Krishna Raj Salim
  • 7,331
  • 5
  • 34
  • 66
86
votes
5 answers

How can I use delay() with show() and hide() in Jquery

How can I use delay() with show() and hide() in Jquery ?
faressoft
  • 19,053
  • 44
  • 104
  • 146
75
votes
5 answers

How to add random delays between the queries sent to Google to avoid getting blocked in python

I have written a program which sends more than 15 queries to Google in each iteration, total iterations is about 50. For testing I have to run this program several times. However, by doing that, after several times, Google blocks me. is there any…
Hossein
  • 40,161
  • 57
  • 141
  • 175
73
votes
17 answers

RxJava delay for each item of list emitted

I'm struggling to implement something I assumed would be fairly simple in Rx. I have a list of items, and I want to have each item emitted with a delay. It seems the Rx delay() operator just shifts the emission of all items by the specified delay,…
athor
  • 6,848
  • 2
  • 34
  • 37
63
votes
5 answers

Delay or Wait-For Statement

I have a 500,000 line SQL script: UPDATE users SET region_id = 9814746 WHERE id = 101 AND region_id IS null; UPDATE users SET region_id = 9814731 WHERE id = 102 AND region_id IS null; UPDATE users SET region_id = 3470676 WHERE id = 103 AND region_id…
sharadov
  • 968
  • 2
  • 13
  • 32
59
votes
5 answers

How to minimize the delay in a live streaming with ffmpeg

i have a problem. I would to do a live streaming with ffmpeg from my webcam. I launch the ffserver and it works. From another terminal I launch ffmpeg to stream with this command and it works: sudo ffmpeg -re -f video4linux2 -i /dev/video0 -fflags…
Pasquale C.
  • 619
  • 1
  • 9
  • 7
57
votes
4 answers

Is setTimeout with no delay the same as executing the function instantly?

I am looking at some existing code in a web application. I saw this: window.setTimeout(function () { ... }) Is this the same as just executing the function content right away?
Aishwar
  • 9,284
  • 10
  • 59
  • 80
57
votes
3 answers

Measure website load time with Python requests

I'm trying to build a tool for testing the delay of my internet connection, more specifically web site load times. I thought of using the python requests module for the loading part. Problem is, it's got no built-in functionality to measure the time…
cookM
  • 953
  • 3
  • 8
  • 11
51
votes
6 answers

How to create a delayed queue in RabbitMQ?

What is the easiest way to create a delay (or parking) queue with Python, Pika and RabbitMQ? I have seen an similar questions, but none for Python. I find this an useful idea when designing applications, as it allows us to throttle messages that…
eandersson
  • 25,781
  • 8
  • 89
  • 110
43
votes
4 answers

jQuery: append() object, remove() it with delay()

what's wrong with that? $('body').append("
Upload successful!
"); $('.message').delay(2000).remove(); I want to append a success message to my html document, but only for 2sec. After that the div should be deleted…
matt
  • 42,713
  • 103
  • 264
  • 397
40
votes
7 answers

How to create delay function in QML?

I would like to create a delay function in javascript that takes a parameter of amount of time to delay, so that I could use it do introduce delay between execution of JavaScript lines in my QML application. It would perhaps look like this: function…
Sнаđошƒаӽ
  • 16,753
  • 12
  • 73
  • 90
40
votes
11 answers

Dismiss UIAlertView after 5 Seconds Swift

I've created a UIAlertView that contains a UIActivityIndicator. Everything works great, but I'd also like the UIAlertView to disappear after 5 seconds. How can I Dismiss my UIAlertView after 5 seconds? var alert: UIAlertView = UIAlertView(title:…
Serge Pedroza
  • 2,160
  • 3
  • 28
  • 41
38
votes
1 answer

How windows handle the clipboard interface with Xming?

My question comes from a problem: I Use Xming on Windows 7 to connect to a Linux host (through PuTTY) in order to start and display a gnome-terminal. I have some troubles using the Windows clipboard: Copy from Windows to Xming works well. (Ctrl-C…
Jonathan
  • 764
  • 6
  • 14
35
votes
6 answers

Flutter/Dart - Open a view after a delay

I'm trying to find a solution to open a view after a delay in a loading view. I have a View, in which there is a button and when I press it, the onPressed() method triggers a Navigator.of(Context).pushNamed("/loading"). which opens the loading view.…
Tiziano Gioè
  • 683
  • 2
  • 7
  • 8