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
15
votes
4 answers

Introducing delay while ajax call in select2 plugin

I am using select 2 example from http://ivaynberg.github.io/select2/ I am using "Loading Remote Data" example in this page. Problem: As soon as I type a letter, system makes an ajax call. I want to introduce delay of 1 second during this request…
SharpCoder
  • 18,279
  • 43
  • 153
  • 249
14
votes
3 answers

How to show characters for a few seconds in a WPF password box?

If the user enters 1985 in the password box, four bullets (●●●●) will be shown. How can I show each letter or number entered for a few seconds and after that change it to a bullet? I suppose that this can't be done in the password box, but is there…
Simce
  • 141
  • 1
  • 1
  • 3
14
votes
3 answers

Time delay estimation between two audio signals

I have two audio recordings of a same signal by 2 different microphones (for example, in a WAV format), but one of them is recorded with delay, for example, several seconds. It's easy to identify such a delay visually when viewing these signals in…
GreyCat
  • 16,622
  • 18
  • 74
  • 112
14
votes
8 answers

Delay CSS function in Jquery?

How can I delay a CSS change in jquery? Here is my code: $("document").ready(function() { $(".pressimage img").mouseenter(function() { $jq(this).css('z-index','1000'); }); $(".pressimage img").mouseleave(1000,function()…
Evanss
  • 23,390
  • 94
  • 282
  • 505
14
votes
2 answers

Run function/code after certain time with nodejs

I am looking for a way to run some code in nodejs after N amount of seconds. Tried setTimeout() but it seems to completely block on it until the time is out but this is not what I want since my server is still sending and receiving events. Any…
JerryFox
  • 615
  • 2
  • 13
  • 25
14
votes
3 answers

How to use FastClick.js with Phonegap and JQM?

I've tried a few different ways to remove the 300ms delay due to the webkit browsers handling of touch events. The library, FastClick.js, seems to be the preferred method, yet I'm having a little trouble implementing it. I've included it and also…
user2400026
14
votes
2 answers

Android: use handler post.delayed twice

I would like to know if it's possible to use handler().postdelayed twice? I mean, I want to create a button, that when clicked it change the color and stay in this state 1 second, then, after 1 second another button change the color. I've created…
loading27
  • 153
  • 1
  • 1
  • 5
14
votes
2 answers

Log delay in Amazon S3

I have recently hosted in Amazon S3, and I need the log files to calculate the statistics for the "get", "put", "list" operations in the objects. And I've observed that the log files are organized weirdly. I don't know when the log will appear(not…
Lulu
  • 173
  • 1
  • 8
14
votes
7 answers

Call method after 5 millisecond

How to call record method after 5 millisecond playing audio with MediaPlayer. I tried something like that but i don't know and i didn't find any good examples to end this. while(mp.isPlaying()){ if(record=0){ for(int i=0; i<5millisec;…
nedroid
  • 193
  • 2
  • 2
  • 7
14
votes
3 answers

Sleeping less than a second in OCaml

The Unix.sleep function can suspend the program for whole seconds, but how can you suspend it for less than a second?
Matthew Piziak
  • 3,430
  • 4
  • 35
  • 49
13
votes
2 answers

Arduino custom library error when compiling delay()

I am trying to write an adruino library but keep getting hung up on errors requiring me to include header files. I have run into one that I can't find the header file for. I keep getting the error: ...file.cpp:23: error: 'delay' was not declared in…
Pierce Barney
  • 143
  • 1
  • 1
  • 7
13
votes
2 answers

Overlay video after set time offset with FFmpeg

I'm trying to add overlays to an input video with ffmpeg that appear some time after the video starts. The basic way to add an overlay is: ffmpeg -i in.avi -vf "movie=overlay.avi [ovl]; [in][ovl] overlay" out.avi But this adds the overlay video (or…
Future Optical
  • 201
  • 1
  • 2
  • 6
13
votes
2 answers

Callback function fires too early

I have this simple function in jQuery: function detailspage(page) { if (page != checkcurrent) { checkcurrent = page; $('div#details').children("div").slideUp("slow", function() { …
Steeven
  • 4,057
  • 8
  • 38
  • 68
13
votes
2 answers

Why does the Java doClick() use 68 milliseconds when it calls doClick(pressTime)?

In doClick() when it calls doClick(pressTime) does it send 68 milliseconds? Why did they decide on 68 instead of a more round number? Is it a completely arbitrary number? From Java AbstractButton: public void doClick() { doClick(68); }
Ian
  • 354
  • 4
  • 13
13
votes
2 answers

JavaScript - How to Wait / SetTimeOut / Sleep / Delay

This again is my Rock Paper Scissors game. At present state the user can't see what's happening because after being prompted for input(Rock, Paper or Scissors) they are immediately reprompted. The question is how can I make the program delay such…
Ash
  • 217
  • 1
  • 2
  • 8