of

fun of(startTime: Instant, endTime: Instant, duration: Duration, stages: List<SleepSession.SleepStage>?): SleepSession

Creates a SleepSession instance with a given start time, end time and duration.

Return

An instance of SleepSession.

Since

1.0.0

Parameters

startTime

The bedtime in this sleep session specified as Instant.

endTime

The wake-up time in this sleep session, specified as Instant.

duration

The duration of the sleep session. It indicates the time from bedtime to wake-up time within this session.

stages

The list of sleep stages recorded during this sleep session.

Preferences Submitted

You have successfully updated your cookie preferences.