add support for the sleep API
Merge branch 'getsleep' into develop