Fixed previous commit.

Added variable timeout length, based on elapsed frame time.