In older systems, this bar mainly worked around the amount of "tasks" you'd put in an array or something, and the system would sign off and display the progress bar accordingly.
With files, its just % of bytes transferred so far, the read head.
But with other things, you dont *know* how much it's going to take, unless you know all the variables, in which case you can reduce the tasks to some degree that it'd skip those "time-taking tasks" in some efficient manner anyway.