In a lab experiment, goldfish were conditioned to receive a light stimulus followed shortly by an aversive electric shock, with a constant time interval between the two stimuli. Test subjects showed an increase in general activity around the time of the electric shock. This response persisted in further trials in which the light stimulus was kept but the electric shock was removed. This suggests that goldfish are able to perceive time intervals and to initiate an avoidance response at the time when they expect the distressing stimulus to happen.