Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I guess that because of historical reasons, from back in the day, when there was no generalised concept of threads.
-
And in C its declaration is in unistd.h or Windows.h (and they are both different).
-
alert2375yI don't see a big problem here
Especially for newcomers
It's better to import sleep from time module rather than understanding threads and importing it from there -
@sbiewald
As of C11, there's actually thrd_sleep as a cross platform sleep function.
Related Rants

No questions asked
As a Python user and the fucking unicode mess, this is sooooo mean!
I just started working on a little project to browse devrant from terminal. It converts images to ascii art!
The fact that the sleep function is in the time module and not in, like, the threading module is so stupid.
rant
python