The present invention relates to a leak detection apparatus comprising:a controller having at least one processor to access data representing a measured flow of breathable gas, the controller being further configured to:determine a first occurrence associated with the measure of flow falling below a threshold in a breath and a second occurrence associated with the measure of flow rising above the threshold in the breath;analyze a duration associated with the first and second occurrences; andidentify a leak event based on the analyzing.