Fix a warning in Core::sleep()

Thanks @jleclanche