Calculate sleep duration between bedtime and wake time, including cross-midnight schedules.
Category: Utilities.