Irregularly spaced time series are commonly encountered in the analysis of time series. A particular case is that in which the collection procedure over time depends also on the observed values. In such situations, there is stochastic dependence between the process being modeled and the times at which the observations are made. Ignoring this dependence can lead to biased estimates and misleading inferences. In this paper, we introduce the concept of preferential sampling in the temporal dimension and we propose a model to make inference and prediction. The methodology is illustrated using artificial data as well a real data set.The authors acknowledge Foundation FCT (Fundacao para a Ciencia e Tecnologia) for funding through Individual Scholarship PhD PD/BD/105743/2014, Centre of Mathematics of Minho University and Center for Research & Development in Mathematics and Applications of Aveiro University within project UID/MAT/04106/2019