Revert "Changing timeout functions"

This reverts commit b4bf85179d6d4bc0d30ab88c35ed1a0f1efe9c79.