How long should I wait before animating the navigation bar in/out when the user scrolls?

I'm currently working on a new design for a site and I've encountered a problem I've never found before.

I want to collapse the navigation bar up when the user scrolls down to increase available real estate.

Is there a standard time delay to wait before collapsing a menu?