added support for sleeping power-down-style
implemented sleep_ms