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.


Change-Id: Ia39e456575b79ba9fcd5328b3dc2c9a2d4d71790
Commit-Queue: Jon Salz <>
Reviewed-by: Jon Salz <>
Tested-by: Jon Salz <>
1 file changed