  We compute the joint distribution of the first times a linear diffusion makes
an excursion longer than some given duration above (resp. below) some fixed
level. In the literature, such stopping times have been introduced and studied
in the framework of \emph{Parisian} barrier options, mainly in the case of
Brownian motion with drift. We also exhibit several independence properties,
and provide some formulae for the associated ruin probabilities.
