Is the word "window" used in the same way in the following two sentences?

They had a window of less than an hour when an attack would have succeeded.

Window of opportunity.
the same meaning