in reply to Re^4: Shared memory and asynchronous accessin thread Shared memory and asynchronous access
The if statement is helpful to update only when $time contains data. The cursor appears fixed now.
printf "\rProgress: %s", $time if $time; [download]