FYI, in your reproduction, both of the conditionals are the same. But you are right, the initial implementation was `!=`
while [[ $SECONDS != $1 ]]; do
became while [[ $SECONDS -lt $1 ]]; do