getSleepDuration

fun getSleepDuration(units: TimeUnit = TimeUnit.MINUTES): Long

Returns sleep duration in specified time units (doesn't include duration of awakes). Default units: TimeUnit.MINUTES.

Return

sleep duration in specified time units

Parameters

units

what units of time to return sleep duration