sleep is a system call that suspends a process or thread for a specified amount of time
Questions tagged [sleep]
3187 questions
1
vote
2 answers
Timeout handle email php
I would like to redirect my user to a new page, but the current site continues to run a script that sends a threaded message 10 minutes later at a specified address. I tried something like this:
Header('Location:…

szebasztian
- 171
- 3
- 14
1
vote
3 answers
Compile error on linux (a simple demo code on concept of pipe)
So I get this error when I try to compile this code named pipe on linux
pipe.c: In function ‘main’:
pipe.c:27:14: error: ‘Amsg’ undeclared (first use in this function)
write(fd[1], Amsg, strlen (Amsg));
^
pipe.c:27:14: note: each…
user5009348
1
vote
3 answers
Setting a timer?
I'm uploading a file, all working fine, but I want to set a time for 60 seconds, so it waits for the file to upload before moving on.
Any ideas?

James Jeffery
- 109
- 2
- 8
1
vote
1 answer
Should PHP sleep after a MySql Insert when that INSERT is required right after success?
PHP - > Inserts VALUE into MySql database on FILE1.php
-- Success: Redirects to FILE2.php?ID=(Last_Id) --
PHP - > Requires (Last_Id) to work fine.
Question:
Should PHP sleep 1 second before redirecting, when the mentioned database contains 100k+…

Nikau
- 51
- 8
1
vote
1 answer
why is GlutPostRedisplay and sleep function is not working in this code?
i have tried to implement the data transfer between usb and cpu in this project. The data transfer is being shown as a small rectangle moving from one component of the computer to another.
In the code below, the GlutPostRedisplay does not…

Karthik Bharathi
- 11
- 2
1
vote
1 answer
Sending large number of emails in PHP with a sleep command and preventing the domain from hanging during the job
I have an email list of people I have to send out emails to every morning. The number is about 1000 at the moment and it is on my own VPS LINUX server.
The problem is that when the job is running the websites I have on the server seem to hang and…

MonkeyMagix
- 677
- 2
- 10
- 30
1
vote
3 answers
Is there a delay timer for when system is operational?
For implementation of my Windows service, I need to be able to set a timer for a certain duration of system being in the working state. So I originally came up with the following code.
A) Setting up a waitable timer (error checks are…

c00000fd
- 20,994
- 29
- 177
- 400
1
vote
1 answer
Executing a particular statement in intervals in C while other statement keeps running
Is it possible to do so?
I want to execute the following statements...
while(1){
fputs(ch, b);
printf("Extracting information please wait..."); //This is the line I want to execute in intervals
}
Is it possible to do so in C?
I tried…

bayblade567
- 270
- 1
- 10
1
vote
1 answer
Delphi: Creating and Reading a text file is causing an I/O 32 error. Should this be prevented using sleep?
I am currently working on a program that needs to be able to report whether or not Windows has been activated.
function TSoftwareReport.getLicenceInfo : String;
var
Activated : String;
LicenceFile : TextFile;
begin
// redirect command output…

Michael G
- 13
- 2
1
vote
2 answers
How to use Sleep in the application in iphone
I have used to loading a default image in my appication. So i have set to,
Sleep(3); in my delegate.m class.
But sometimes it will take more than 6 to 7 minutes. So i want to display the image 3 seconds only and then it goes to my appilcation…

Pugalmuni
- 9,350
- 8
- 56
- 97
1
vote
1 answer
Adding a pause to a graphical output
I've created a program to handle directed graphs. I also used a raster to display the graph. (I'm still working on cleaning it up, although it should be sufficient to show the computations.)
I want a pause in the graphing, so as the items change…

failure
- 215
- 1
- 3
- 12
1
vote
1 answer
Python tkinter time.sleep()
How come when I run my code, it will sleep for 3 seconds first, then execute the 'label' .lift() and change the text? This is just one function of many in the program. I want the label to read "Starting in 3...2...1..." and the numbers changing…

Lucas N
- 69
- 9
1
vote
2 answers
Whats the difference between using boost::this_thread::sleep_for() and regular sleep() function?
We know that boost::this_thread::sleep_for(...) can be used for putting the currently running thread into sleep. How different it is from the regular sleep() function. It seems everyplace where we use boost::this_thread::sleep_for(...) can be simply…

Ramesh Chandra
- 13
- 4
1
vote
4 answers
Change image source back after a short period
I am trying to change the source of an image after a delay of two seconds. I am changing the source, waiting for two seconds and then changing it back to another random image. This is my function:
function ChangeToBomb() {
var…

Mathias Verhoeven
- 927
- 2
- 10
- 24
1
vote
1 answer
time.sleep(1) error -- python on Raspberry Pi
I have:
time.sleep(1)
in my python twice.
However on the second time the script crashes saying:
Traceback (most recent call last):
File "ON-BOOT.py", line 36, in
time.sleep(1)
AttributeError: 'int' object has no attribute…

Bill Bodkin
- 23
- 7