Don't measure performance while the window is hidden.