My wife and I make it a policy to never go to a restaurant when there is less than 45 minutes left before closing. And we're efficient with our orders... we virtually always know exactly what we want before the wait staff comes to us the first time.
One of the restaurants I frequently eat at has a 'kitchen closing time' (after that, you can't order any meals any more, but possibly still order coffee and such), and a restaurant closing time, which is (I believe) 45 minutes later.