Questions tagged [sleep]

1 votes
1 replies
Why does SIGINT stop sleep more than one time?
I don't understand why after the first execution of kill function the sleep function doesn't pause the parent process. After the SIGINT has been...
asked 4 months ago
0 votes
0 replies
Prevent Raspberry Pi from Sleeping
I want to prevent Raspberry Pi from going to sleep I tried below mentioned Solution but my pi is going to sleep every 10 min. I am using Raspbia...
asked 4 months ago
0 votes
0 replies
How to make it so Thread.sleep happens after removing a JPanel component? [duplicate]
Here is a snippet kit.insertHTML(doc, doc.getLength(), "Hello", 0, 0, null); try{ Thread.sleep(1000); }catch(Exception e){} I am using HTMLEdi...
asked 4 months ago
-2 votes
0 replies
Sleep a Loop that is within another another Loop
Sleep seems to be applying itself to the end of the parent while loop, instead of the nested for loop where I call it. The loop I call it in, run...
asked 4 months ago
0 votes
0 replies
How can I pause the UI using gtk and C?
I'm making a Sudoku in C using GTK for the UI. I'm implementing the sudoku with backtracking, and I'd like for it to be kind of animated, that is...
asked 5 months ago
0 votes
1 replies
React Native : How to find Screen awake time between Sleeps
I`m creating an Application that tracks the Screen awake time. How to get the Screen awake time and to display it. 0 1 Answers...
asked 5 months ago
0 votes
1 replies
React Native : How to find Screen awake time between Sleeps
I`m creating an Application that tracks the Screen awake time. How to get the Screen awake time and to display it. 0 1 Answers...
asked 5 months ago
0 votes
0 replies
what happens at processor and schedule queue level when I call time.sleep() in python
Hey I am just trying connect my learning in Operating System subject and python programing. When I run time.sleep(10) what exactly happens behind...
2 votes
2 replies
How do I implement the sleep function in my for loop correctly? (Ubuntu)
I'm trying to make my code print something to the screen, then wait 1 second, then go around the for loop and print it again 21 times. It works w...
asked 5 months ago
0 votes
1 replies
how create a sleep mode for servers
for my jelastic servers as i dont use much would like to put them in something similar to sleep, that they are only activated in http request i s...
asked 5 months ago
1 votes
2 replies
If there is any pausing/sleeping or events in x86 assembly
I am wondering if there is anything at the assembly level in x86-64 that allows you to sleep/wait, such that no instructions are run until the wa...
0 votes
0 replies
How to check if a function doesn't return a value (API)
I'm using an API to receive data every one second using a structure like this: from time import sleep try: data = API(options) except: s...
asked 6 months ago
1 votes
1 replies
service stops when python script sleeps
I wanted to create a Service that runs a python script. This is what i have so far: The Service [Unit] Description=A test unit [Service] Exec...
asked 5 months ago
1 votes
1 replies
How can I make a program wait in OCaml?
I'm trying to make a tetris game in ocaml and i need to have a piece move through the graphics screen at a certain speed. I think that the best...
asked 6 months ago
1 votes
2 replies
How to make a timer in python without freezing up the entire code
I am coding Mario using Pygame and I'm coding the blocks right now. I want to make a timer so when I hit the block after a second the block goes...
asked 5 months ago
0 votes
1 replies
How to see more than one change in same function when using sleep in Python PySide2 [duplicate]
This question already has an answer here: PyQt GUI order of operations 1 answer...
asked 5 months ago
1 votes
1 replies
Kubernetes how to create a sidecar which runs initialization and terminate
I need a sidecar in kubernetes cluster which runs initialization script and then terminates or sleep forever. I can't do this in postStart as pos...
3 votes
2 replies
Java - How can I pause code without pausing a GIF animation in my GUI?
Currently I have a start menu for a game with a button which transform my menu background image from a PNG into a GIF after a button press. Now,...
asked 5 months ago
-1 votes
3 replies
Python 3.6 sleep() different sleep times within same string depending on character [duplicate]
This question already has an answer here: How to test multiple variables against a value?...
asked 6 months ago
3 votes
4 replies
How to increase sleep/pause timing accuracy in python?
I ran an experiment to compare sleep/pause timing accuracy in python and C++ Experiment summary: In a loop of 1000000 iterations, sleep 1 micro...
asked 6 months ago
0 votes
2 replies
Why Thread.sleep() doesn't work accordingly in JavaFX?
When i am using JavaFX, the sleep function won't work accordingly. Like in this code: public class Controller { @FXML private Label label; @FXM...
asked 8 months ago
0 votes
1 replies
User Input not Printing below text
Im trying to have text that writes slowly then use a do-while loop, but when I run the code I get: enter text below >: when it should be like:...
asked 8 months ago
0 votes
0 replies
I am having a problem passing arguments to execvp using sleep and fork
I asked a really terrible question last time so I will try and do better here. I have the following code: int main(int argc, char* argv[]) {...
asked 6 months ago
0 votes
0 replies
Why am I getting the attribute error: 'time.struct_time' object has no attribute 'sleep'?
I'm working on a small program to practice multithreading where I create two timer threads to output the current time. I've made two timer functi...
asked 7 months ago
0 votes
0 replies
Can I tell a script to pause when the wifi goes down? [duplicate]
I would like to add a retry mechanism to python request library, so scripts that are using it will retry for non fatal errors. At this moment I...
asked 7 months ago