Javascript sleep, javascript wait, javascript setTimeout

javascript setTimeou

When you are trying to call same ajax function again and again ,then it may be possible that some calls are not acknowledged.i experienced this problem so i’m sharing this article Javascript sleep, javascript wait, javascript setTimeout with you .

Sleep function  stops the executing thread for given amount of time.

for example:
we have function name

if call it 4 times continuously then it may be possible that not all function calls acceptable.

to solve this problem you have to insert some pause or some time interval between two or more consecutive call.to do so you can introduce javascript delay between two calls.

LIKE:

here is the javascript function you can name it coffeebreak, teabreak,   Javascript sleep, javascript wait, javascript setTimeout , javascript delay.

Javascript sleep, javascript wait, javascript setTimeout

as shown in code it works on the current date/time and date/time  interval you choose

Live example of this function:

[do_widget id=text-5]
You can download the copy of this example.
Download

, ,