The presence of artifacts plays a crucial role in automatic sedation systems and may introduce variable time delays (TDs) in the closed-loop-control structures. This paper presents a successful procedure to estimate the varying TD of the bispectral index (BIS) monitor used in closed-loop control during intensive care. The TD estimation (TDE) is based on the cross-correlation analysis technique and the method is validated with real measured signals of propofol and BIS. Extended prediction self-adaptive control is used in combination with a Smith predictor to reduce the computational burden imposed by the variable TD. The conclusion is that an online TDE of the BIS monitor improves the performance of the closed-loop system for reference tracking, disturbance rejection, and overall stability.