Use after
to schedule a function to run in the future. The first argument is an amount of time in milliseconds, the second argument is a callable function.
def stop_progressbar(self):
self.progressbar.stop()
self.after(10000, self.stop_progressbar)
Of course, you'll want to call your window3.destroy
function in a similar way, or within the stop_progressbar
function so it doesn't run while the system is waiting to stop the progressbar.