Fix occasional hangs in Snake app.

The timeout passed to waitForPress() could become negative in
the time elapsed between the time it is checked and used. This
would cause the app to stop responding to input. The badge would
eventually return to the home screen after the app was killed.