/// <summary> /// Returns the duration of delay to the next duration from the floored time now. /// </summary> /// <param name="now">The time now.</param> /// <param name="duration">The duration.</param> /// <returns>The delay duration.</returns> public static Duration GetDelayToNextDuration(ZonedDateTime now, Duration duration) { return((now.Floor(duration) + duration) - now); }