That is a good idea and may be more performant for the main loop actually but I also use sleep in the C style for loop, where I iterate through terminal lines. I could use a bunch of pure Bash microsleeps (:;:) because I believe they are dependent on CPU and not like 0.1s or some set value
View all comments
Show parent comment
2
u/cowbaymoo May 06 '24
If you replace
sleep 0.1withread -rst 0.1it will be pure Bash!