How long after shutting down a fully warmed engine does it cool enough to affect the valve settings in a negative way?

I've alwyas wondered.