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
13
votes
3 answers

Jquery delay on fadeout

I have this code that changes the opacity of the div on hover. $("#navigationcontainer").fadeTo("slow",0.6); $("#navigationcontainer").hover(function(){ $("#navigationcontainer").fadeTo("slow", 1.0); // This sets the opacity to 100% on hover…
user272899
  • 871
  • 5
  • 16
  • 22
13
votes
1 answer

Task.Delay vs DispatcherTimer?

I'm considering use Task.Delay() for a non-stop timer, because it's more simple and readable. As I'm new to .NET, I see no significant difference between the two codes. Can you show me the difference (if there is any) between them? // Create…
NoName
  • 7,940
  • 13
  • 56
  • 108
12
votes
4 answers

NSButton with delayed NSMenu - Objective-C/Cocoa

I want to create an NSButton that sends an action when it is clicked, but when it is pressed for 1 or two seconds it show a NSMenu. Exactly the same as this question here, but since that answer doesn't solve my problem, I decided to ask again. As an…
Alex
  • 5,009
  • 3
  • 39
  • 73
12
votes
3 answers

UIView's animateWithDuration delay not delaying animation

I am trying to perform an animation on a label where a flip animation happens and after it is done and after a delay, The text of the label changes. It seems that the delay never happens. The text immediately changes after the flip completes…
Asem H.
  • 743
  • 3
  • 7
  • 16
12
votes
2 answers

How can I pause for 100+ milliseconds in a linux driver module?

I'm writing a kernel driver for a device that produces regular amounts of data for reading periodically. The user space program is ideally suited to making this a blocking driver. What methods are available for pausing anywhere from 4 to 100ms in a…
Jamie
  • 7,075
  • 12
  • 56
  • 86
12
votes
4 answers

Delay the return of a function

Is there anyway to delay the return of a function using setTimeout()? function foo(){ window.setTimeout(function(){ //do something }, 500); //return "something but wait till setTimeout() finishes"; }
khousuylong
  • 399
  • 2
  • 4
  • 12
12
votes
4 answers

Angular 5 - equivalent to $interval from AngularJS

I'm trying to find the equivalent of the $interval from AngularJS into Angular 5. $interval will repeat a function call or a block a specified number of times with a delay in-between. This is what I would like to do, written in…
Bogdan Pușcașu
  • 545
  • 2
  • 7
  • 21
12
votes
1 answer

DispatchQueue.main.asyncAfter is inaccurate

I am trying to call a function after a delay. On iOS10 I am able to use Timer.scheduledTimer which does indeed call my closure after the given delay. However, on iOS9 I am using DispatchQueue.main.asyncAfter and it calls my closure with a six second…
J_J
  • 123
  • 1
  • 7
12
votes
1 answer

Delayed evaluation in Clojure

I'm having some trouble understanding how the delay macro works in Clojure. It doesn't seem to do what expect it to do (that is: delaying evaluation). As you can see in this code sample: ; returns the current time (defn get-timestamp []…
StackedCrooked
  • 34,653
  • 44
  • 154
  • 278
12
votes
1 answer

CSS animation delay in between loop

Trying to get a label with class price to slide up, then slide back down with CSS. I have the following -- -webkit-animation-name: slidingPrice; -webkit-animation-duration: 300ms; -webkit-animation-iteration-count:…
Yasir
  • 879
  • 5
  • 13
  • 31
12
votes
1 answer

Do Delay Queue messages count as "In Flight" in SQS?

I'm working on a project in which I intend to use an Amazon SQS Delay Queue. I'm having a bit of trouble understanding exactly what is meant by "inflight" messages. There is a note in the documentation that says: Note There is a 120,000 limit for…
Brad Dwyer
  • 6,305
  • 8
  • 48
  • 68
12
votes
2 answers

Gradle - How to add some delay pause hang in Gradle

Im looking for a way to insert a pause of few seconds between the calls of two gradle tasks. I can use firstTask.doLast { ..... } something like which can do Linux/Unix sleep 45 Any ideas?
AKS
  • 16,482
  • 43
  • 166
  • 258
12
votes
2 answers

Call method after some delay in java

Scenario is like : In my application, I opened one file, updated it and saved. Once the file saved event get fired and it will execute one method abc(). But now, I want to add delay after save event get fired, say 1 minute. So I have added…
Naresh J
  • 2,087
  • 5
  • 26
  • 39
11
votes
4 answers

How to detect user has stopped typing in TextField?

I am using a TextField under which onChanged function I am calling my code but the issue right now is the code gets execute everytime a new word is either entered or deleted. what I am looking for is how to recognize when a user has stopped…
Vicky Salunkhe
  • 9,869
  • 6
  • 42
  • 59
11
votes
5 answers

Sox : merge two audio files with a pad

I'm using the sox tool and I would like to merge two audio files, let's say long.ogg and short.ogg to output a file output.ogg. This is very easy using $ sox -m long.ogg short.ogg output.ogg. Thing is, I would like the short.ogg to be played after n…
zopieux
  • 2,854
  • 2
  • 25
  • 32