// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Game.Screens.Play; namespace osu.Game.Beatmaps.Timing { public class BreakPeriod { /// /// The minimum duration required for a break to have any effect. /// public const double MIN_BREAK_DURATION = 650; /// /// The break start time. /// public double StartTime; /// /// The break end time. /// public double EndTime; /// /// The break duration. /// public double Duration => EndTime - StartTime; /// /// Whether the break has any effect. Breaks that are too short are culled before they are added to the beatmap. /// public bool HasEffect => Duration >= MIN_BREAK_DURATION; /// /// Whether this break contains a specified time. /// /// The time to check in milliseconds. /// Whether the time falls within this . public bool Contains(double time) => time >= StartTime && time <= EndTime - BreakOverlay.BREAK_FADE_DURATION; } }