A particle moves along a straight line OX. At a time t (in second) the distance x (in metre) of the particle from O is given by $x = 40 + 12t - t^{3}$. How long would the particle travel before coming to rest?