A drug delivery system comprising a controller adapted to detect when a given user-actuated operation being part of the expelling of an amount of drug is performed, record detected operations as a function of time, and estimate, based on recorded operations, time parameters for the detected operations, thereby providing time parameters for a medical regimen on which the detected operations are assumed to be based upon.