Top "Sleep" questions

sleep is a system call that suspends a process or thread for a specified amount of time

What's the algorithm behind sleep()?

Now there's something I always wondered: how is sleep() implemented ? If it is all about using an API from the …

c algorithm sleep
Sleep() vs sleep_for()

Can someone explain the difference in behavior between these two ways of stopping a thread and then continue it again?. …

c++ multithreading sleep thread-sleep
Equivalent of usleep() in CUDA kernel?

I'd like to call something like usleep() inside a CUDA kernel. The basic goal is to make all GPU cores …

cuda sleep gpu usleep
Thread.sleep() implementation

Today I had an interview on which I asked candidate quite usual and basic question about the difference between Thread.…

java multithreading sleep wait
php output with sleep()

I'm trying to run a loop every second for 25 seconds basically. for($i = 0; $i <= 25; $i += 1){ echo $i; sleep(1) } The …

php sleep php4
Empty loop which waits for condition (busy-waiting)

I have been spending the last 20 minutes doing research on empty loops which purpose are only to wait for a …

c++ while-loop conditional-statements sleep busy-waiting
Suspend / Hibernate pc with python

I'd like to write a short python script that puts my computer to sleep. I'Ve already searched the API but …

python sleep suspend
What is _GLIBCXX_USE_NANOSLEEP all about?

A preprocessor macro called _GLIBCXX_USE_NANOSLEEP appears in two standard header files: c++/4.7.1/x86_64-unknown-linux-gnu/bits/c++config.h …

c++ gcc sleep glibc
How accurate is Sleep() or sleep()

I'm trying simulate a key down and key up action. For example: 2638 millseconds. SendMessage(hWnd, WM_KEYDOWN, keyCode, 0); Sleep(2638); SendMessage(…

c winapi sleep windows-xp-sp3
Put Android to sleep for testing

Hi i am creating an alarm app and currently have some issues dealing with the Wakelock(or perhaps it's something …

android sleep thread-sleep wakelock