Given a smooth function f : R n → R and a convex function Φ : R n → R, we consider the following differential inclusion:t≥ 0, where ∂Φ denotes the subdifferential of Φ. The term ∂Φ(ẋ) is strongly related with the notion of friction in unilateral mechanics. The trajectories of (S) are shown to converge toward a stationary solution of (S). Under the additional assumption that 0 ∈ int ∂Φ(0) (case of a dry friction), we prove that the limit is achieved in a finite time. This result may have interesting consequences in optimization.