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

SwiftUI show custom View with delay

I have something like this in my ZStack : if hidePopup { CustomButton() .hidden() } else if stateManager.isBtnClosePressed { CustomButton() .hidden() } else { CustomButton() } And I need in the last else to show…
Lina_F
  • 131
  • 2
  • 10
8
votes
3 answers

How to trigger lambda with some delay when message published to SQS?

I have a lambda configured to be triggered when messages are published to SQS queue. Here is the SAM template for deployment. MyQueue: Type: AWS::SQS::Queue Properties: VisibilityTimeout: 180 DelaySeconds: 90 MyLambda: …
Affan Shahab
  • 838
  • 3
  • 17
  • 39
8
votes
2 answers

Adding delay to a $.post jquery request

I'm sending a jquery $.post request on any checkbox change in a form. What I want is to delay the $.post for 500 ms in case a user checks more than one checkbox rapidly, to avoid multiple useless requests. Here's my code, I've added a setTimeout…
Phil
  • 83
  • 1
  • 3
8
votes
2 answers

Cordova adds 350ms delay on click() events in iOS

If I use something like $('button').click(function() { alert('hi'); } and I add the following to my : ..and I run it as a normal mobile site on iOS 11, there is no delay…
Tonald Drump
  • 1,227
  • 1
  • 19
  • 32
8
votes
2 answers

CABasicAnimation delay between repeat

The code below creates a "shimmer" effect and works great. (The look of reflected light moving across a glossy surface.) It's currently set to repeat forever which is fine, however, I'd like there to be a pause between each shimmer. I can delay the…
squarehippo10
  • 1,855
  • 1
  • 15
  • 45
8
votes
3 answers

Swift delay in loop

I have this delay function: func delay(delay:Double, closure:()->()) { dispatch_after( dispatch_time( DISPATCH_TIME_NOW, Int64(delay * Double(NSEC_PER_SEC)) ), dispatch_get_main_queue(), closure) } From…
Zoltan
  • 533
  • 4
  • 18
8
votes
4 answers

Async load routes data and build route instruction for Angular 2

I try to build dynamically routes from angular2 (fetch route config from server), after that I parse it and generate instruction for component route (I have parent routes config and child into different components, because I don`t know how define…
Velidan
  • 5,526
  • 10
  • 48
  • 86
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
8
votes
1 answer

Haskell Arrow delay function

I am reading John Hughes's Programing with Arrows. There is a piece of code that I really cannot understand. The code is following: import Control.Arrow.Operations import Control.Arrow import Control.Category import Prelude hiding ((.),id) newtype…
Song Zhang
  • 315
  • 1
  • 5
8
votes
2 answers

setTimeout fires immediately if the delay more than 2147483648 milliseconds

The problem If the delay is more than 2147483648 milliseconds(24.8551 days) the function will fire immediately. Example setTimeout(function(){ console.log('hey') }, 2147483648) // this fires early setTimeout(function(){ console.log('hey') },…
Adam Halasz
  • 57,421
  • 66
  • 149
  • 213
8
votes
1 answer

animating elements sequentially in pure css3 on loop

I'm trying to animate in elements sequentially in full css3 animations. Seems the very straight forward answer is using animation delay. However I wanted this in loop, any ideas how to make the animation loop infinitely? I found this fiddle on a…
chriz
  • 1,826
  • 2
  • 24
  • 28
8
votes
3 answers

Fade in jquery div show

I am trying to get the below script to fade in and fade out with a delay in between. It shows the div correctly and fades out as it should, but it doesn't fade in?

The product was…

Pete Naylor
  • 776
  • 2
  • 14
  • 33
8
votes
3 answers

How to decrease the delay on starting CSS animations/transitions in Android WebView?

I'm trying to use CSS3 animations in Android WebView but I'm getting a very annoying delay when starting the animation (roughly 500ms). The animation runs smoothly, no lag, but it has the delay at start. Since there is no lag, I assume that's not a…
Pedro Barros
  • 1,326
  • 1
  • 12
  • 19
8
votes
1 answer

Multiple delayed job processes starting same job

I'm using delayed job in a setup where I run multiple workers. For the sake of my question, it doesn't really matter, but let's say I run 10 workers (doing that in development mode currently). The problem I am having is that two different workers…
Kenny Lövrin
  • 781
  • 5
  • 15
8
votes
4 answers

jQuery keyup Delay

Hopefully this is a quick and easy one for someone to figure out. I am fairly new to using a lot of javascript/jquery, and I have the following setup to pull a customer name out of a database and display it as the user has finished typing the…
Tarquin
  • 482
  • 2
  • 6
  • 21