When they really have no idea, programmers use progress bars that go back and forth or spinners. Microsoft did a novel strategy with the Windows installer at the end where the screen rapidly changes colors with white text on the screen. It's the functional equivalent of an indeterminate progress bar. Meaning they don't know how long it will take and they'd rather you pass the time and get distracted by the rainbow than stare at a progress bar that might get stuck a lot.