the idea isn’t wrong tho, as sleep can do fractions. bash cannot though. therefore it would bloat the code a bit to use bc to multiply the parameter by 0.5 or so.
For anyone who controls time travel this is the fastest algorithm ever. Probably gonna change everything when we are traveling through space and passing by some dark holes.
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 have a great performance optimization for this
What if instead of 1s sleep, we did 0.5s sleep? That’s a 100% improvement.
It’s not sleeping for 1 second, $1 is an input parameter in the script
That sounds expensive
the idea isn’t wrong tho, as sleep can do fractions. bash cannot though. therefore it would bloat the code a bit to use bc to multiply the parameter by 0.5 or so.
It isn’t what is happening though lol…
For anyone who controls time travel this is the fastest algorithm ever. Probably gonna change everything when we are traveling through space and passing by some dark holes.
Even as a joke, this doesn’t avoid anything. The system scheduler just has to do the sorting using a regular algorithm
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.