𝔼𝕩𝕦𝕤𝕚𝕒@lemmy.world to memes@lemmy.world · 3 days agoTrue Spaghetti codelemmy.worldimagemessage-square49fedilinkarrow-up1945arrow-down14cross-posted to: programmer_humor@programming.dev
arrow-up1941arrow-down1imageTrue Spaghetti codelemmy.world𝔼𝕩𝕦𝕤𝕚𝕒@lemmy.world to memes@lemmy.world · 3 days agomessage-square49fedilinkcross-posted to: programmer_humor@programming.dev
minus-squareidunnololz@lemmy.worldlinkfedilinkarrow-up1·1 day agoThe 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.
minus-squareJackbyDev@programming.devlinkfedilinkEnglisharrow-up4·1 day agoI remember seeing discussions about this at the time, it would also sometimes fail with a very large number of 1s and a single 2.
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.
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.