sleep Questions

14

I'm trying to make a simple script for a game, by changing the time of day, but I want to do it in a fast motion. So this is what I'm talking about: function disco ( hour, minute) setTime ( 1, 0 )...
Cottrell asked 1/8, 2013 at 7:23

9

Solved

I have a java program that does some calculations and then uploads the results to a MYSQL database (hosted in another computer in the same network). I sometimes face the problem that the program do...
Chiaroscuro asked 24/2, 2012 at 22:45

19

Solved

I know the POSIX sleep(x) function makes the program sleep for x seconds. Is there a function to make the program sleep for x milliseconds in C++?
Gamine asked 15/11, 2010 at 12:49

13

Solved

I use startx to start X which will evaluate my .xinitrc. In my .xinitrc I start my window manager using /usr/bin/mywm. Now, if I kill my WM (in order to f.e. test some other WM), X will terminate t...
Ditchwater asked 29/5, 2010 at 13:12

5

Solved

Is there to way write a T-SQL command to just make it sleep for a period of time? I am writing a web service asynchronously and I want to be able to run some tests to see if the asynchronous patter...
Arly asked 20/3, 2009 at 3:39

11

Solved

How can I put a sleep function between the TextUI.text = ...., to wait 3 seconds between each phrase? public Text GuessUI; public Text TextUI; [...truncated...] TextUI.text = "Welcome to Number ...
Mirandamire asked 5/5, 2015 at 14:56

5

Solved

How can I pause execution for a certain amount of time in Godot? I can't really find a clear answer.
Imamate asked 1/7, 2022 at 13:45

19

Solved

On Windows I have a problem I never encountered on Unix. That is how to get a thread to sleep for less than one millisecond. On Unix you typically have a number of choices (sleep, usleep and nanosl...
Wahlstrom asked 17/9, 2008 at 16:37

11

Solved

[System.Windows.Forms.Cursor]::Position = ` New-Object System.Drawing.Point($pos.X, ($pos.Y - 1)) [System.Windows.Forms.Cursor]::Position = ` New-Object System.Drawing.Point($pos.X, $pos.Y) Well...
Copyboy asked 5/4, 2013 at 14:1

3

Solved

When I go to the asyncio page, the first example is a hello world program. When I run it on python 3.73, I can't see any different from the normal one. can anyone tell me the difference and give a ...
Tidwell asked 24/6, 2019 at 4:14

2

Solved

Case: we have a docker container that runs a bash script that needs to "block" forever (because it exposes a volume for another container, but there are other reasons why we sometimes want this). ...
Alviani asked 17/7, 2017 at 15:42

34

Solved

I would like to add a delay/sleep inside a while loop: I tried it like this: alert('hi'); for(var start = 1; start < 10; start++) { setTimeout(function () { alert('hello'); }, 3000); } O...
Helvetian asked 27/8, 2010 at 11:36

7

Solved

What are the recommended approaches to using Thread.sleep() to speed up tests. I am testing a network library with a retry functionality when connections are dropped or timeout errors occur, etc. ...
Swingle asked 8/12, 2009 at 17:44

7

Solved

How do I sleep for shorter than a second in Perl?
Outrun asked 22/5, 2009 at 8:38

3

The web has many articles (and videos) on starting a new Maui app. Microsoft's Maui documentation does discuss the MauiApp lifecycle and enumerates delegates to trigger the appropriate events for e...
Steiermark asked 7/2, 2022 at 17:10

4

Solved

While developing a small cross-platform game on C++, I got stuck with following issue: when players are playing with a USB gamepad without touching a keyboard or mouse, the computer sleeps automati...
Stranglehold asked 19/7, 2015 at 4:52

13

Solved

I can give it floating point numbers, such as time.sleep(0.5) but how accurate is it? If i give it time.sleep(0.05) will it really sleep about 50 ms?
Deicide asked 15/7, 2009 at 20:33

8

Solved

I'm writing a silly program in python for a friend that prints "We are the knights who say 'Ni'!". then sleeps for 3 seconds, and then prints "Ni!" twenty times at random intervals using the random...
Pekan asked 6/8, 2010 at 5:48

17

Solved

I've been using the input function as a way to pause my scripts: print("something") wait = input("Press Enter to continue.") print("something") Is there a formal way ...
Acetaldehyde asked 19/7, 2012 at 0:28

12

Solved

I am using time.sleep(10) in my program. Can display the countdown in the shell when I run my program? >>>run_my_program() tasks done, now sleeping for 10 seconds and then I want it to ...
Indium asked 20/6, 2013 at 17:33

9

Solved

I'm developing a website in Angular 2 using TypeScript and I was wondering if there was a way to implement thread.sleep(ms) functionality. My use case is to redirect the users after submitting a fo...
Grieve asked 11/6, 2016 at 14:7

4

Solved

I'd like to call something like usleep() inside a CUDA kernel. The basic goal is to make all GPU cores sleep or busywait for a number of millesconds--it's part of some sanity checks that I want to ...
Burrus asked 26/6, 2012 at 22:59

5

Solved

I have a 500,000 line SQL script: UPDATE users SET region_id = 9814746 WHERE id = 101 AND region_id IS null; UPDATE users SET region_id = 9814731 WHERE id = 102 AND region_id IS null; UPDATE users ...
Boy asked 25/8, 2009 at 22:38

6

Solved

I have thread that runs loop. I need that loop to be run once every 5ms (1ms error). I know that Sleep() function is not precise. Do you have any suggestions? Update. I can't do it other way. At ...
Gallimaufry asked 15/11, 2012 at 12:30

4

Solved

I'm currently having a PowerPoint presentation that's being used on a computer as some sort of kiosk or information screen. It reads it's text from a text file on the disk. The text in this text fi...
Selinaselinda asked 30/7, 2019 at 9:12

© 2022 - 2025 — McMap. All rights reserved.