• idunnololz@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    4 个月前

    The output isn’t guaranteed to be correct though. Most implementations of sleep can only guarantee that it will sleep for at least the amount of time specified. It can sleep for longer though.

    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      4
      ·
      4 个月前

      I remember seeing discussions about this at the time, it would also sometimes fail with a very large number of 1s and a single 2.