Updated Sleep functions.
Merge branch 'next' into cache