11

The fact that the sleep function is in the time module and not in, like, the threading module is so stupid.

Comments
  • 2
    I guess that because of historical reasons, from back in the day, when there was no generalised concept of threads.
  • 1
    @metamourge
    Also bc python. 🐍
  • 2
    Does sleep exist?

    *Refers to own sleep deprivation*
  • 0
    And in C its declaration is in unistd.h or Windows.h (and they are both different).
  • 0
    I 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
  • 1
    @sbiewald Though Windows' lack of Posix conformance isn't exactly a C issue.
  • 3
    @sbiewald
    As of C11, there's actually thrd_sleep as a cross platform sleep function.
Add Comment