Updated Sleep functions.