Infusion device for administering a medical fluid to a patient, comprising: - a pumping mechanism for pumping a medical fluid from a fluid container through a delivery line towards a patient at a set flow rate, - a sensor device for measuring a force on the pumping mechanism or the delivery line, and - a processor device for deriving, from the force measured by the sensor device, a pressure value indicative of the pressure in the delivery line, wherein the processor device is constituted to compare the pressure value to a threshold value (P thres) for determining whether an occlusion in the delivery line is present, wherein a storage device stores a compliance value associated with the pumping mechanism and/or the delivery line, wherein the processor device is constituted to compute, from the stored compliance value, the flow rate and the threshold value (P thres), an estimate of a duration between the time of an occurrence of an occlusion in the delivery line and the time at which the pressure value exceeds the threshold value (P thres), characterized in that the processor device is constituted to issue a warning if the computed estimate of the duration exceeds a predetermined limit, wherein a user is prevented from entering a threshold value which leads to an excessive estimate of duration between the occurrence of the occlusion and the time of triggering an alarm, by prompting the user to enter another, smaller threshold value. - a pumping mechanism for pumping a medical fluid from a fluid container through a delivery line towards a patient at a set flow rate, - a sensor device for measuring a force on the pumping mechanism or the delivery line, and - a processor device for deriving, from the force measured by the sensor device, a pressure value indicative of the pressure in the delivery line, wherein the processor device is constituted to compare the pressure value to a threshold value (P thres) for determining whether an occlusion in the delivery line is present, wherein a storage device stores a compliance value associated with the pumping mechanism and/or the delivery line, wherein the processor device is constituted to compute, from the stored compliance value, the flow rate and the threshold value (P thres), an estimate of a duration between the time of an occurrence of an occlusion in the delivery line and the time at which the pressure value exceeds the threshold value (P thres), characterized in that the processor device is constituted to issue a warning if the computed estimate of the duration exceeds a predetermined limit, wherein a user is prevented from entering a threshold value which leads to an excessive estimate of duration between the occurrence of the occlusion and the time of triggering an alarm, by prompting the user to enter another, smaller threshold value. wherein a storage device stores a compliance value associated with the pumping mechanism and/or the delivery line, wherein the processor device is constituted to compute, from the stored compliance value, the flow rate and the threshold value (P thres), an estimate of a duration between the time of an occurrence of an occlusion in the delivery line and the time at which the pressure value exceeds the threshold value (P thres), characterized in that the processor device is constituted to issue a warning if the computed estimate of the duration exceeds a predetermined limit, wherein a user is prevented from entering a threshold value which leads to an excessive estimate of duration between the occurrence of the occlusion and the time of triggering an alarm, by prompting the user to enter another, smaller threshold value.