suspend_resume: move sleep to the end of the wake extension loop.

This means that the contents of the loop will be executed only if the
loop condition is actually true, which makes it much less likely that
we will encounter the 'Attempted wake time extension, but suspended
before' condition.

BUG=None
TEST=Manual

Change-Id: Ia39e456575b79ba9fcd5328b3dc2c9a2d4d71790
Reviewed-on: https://gerrit.chromium.org/gerrit/62001
Commit-Queue: Jon Salz <jsalz@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
1 file changed