Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sleep Doesn't Actually Sleep #73

Open
davegoopot opened this issue Sep 2, 2018 · 2 comments
Open

Sleep Doesn't Actually Sleep #73

davegoopot opened this issue Sep 2, 2018 · 2 comments

Comments

@davegoopot
Copy link
Contributor

Connect to the REPL then run:

import sleep
sleep.sleep(10) #Expecting the console to hang for 10 seconds before returning

The console returns immediately.

@marekventur
Copy link
Contributor

Sleep unblocks on incoming interrupts - It's safer to wrap it in a loop and check for time elapsed if you really want to block for a certain amount of time.

@davegoopot
Copy link
Contributor Author

Sleep unblocks on incoming interrupts - It's safer to wrap it in a loop and check for time elapsed if you really want to block for a certain amount of time.

@marekventur , so would it be a mistake to implement sleep.sleep() to loop on the elapsed ticks?

davegoopot added a commit to davegoopot/Mk4-Apps that referenced this issue Sep 2, 2018
davegoopot added a commit to davegoopot/Mk4-Apps that referenced this issue Sep 2, 2018
marekventur added a commit that referenced this issue Sep 2, 2018
Floppy pushed a commit to Floppy/Mk4-Apps that referenced this issue Sep 2, 2018
Floppy pushed a commit to Floppy/Mk4-Apps that referenced this issue Sep 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants