A pencil of mass $m$ and length $l$ can be balanced on its point making an initial small angle $\theta_0$ with the vertical, and with some small angular velocity $\omega_0$.
Solving the linearized equation of motion will reveal that the angle from the vertical increases exponentially fast, until the small-angle approximation is no longer valid, at which point we could say that the pencil has fallen over. Clearly, the time until this happens depends on the initial angle and angular velocity.
Of course, physical considerations mean that we can't ever balance the pencil perfectly. At the limit, Heisenberg's uncertainty principle tells us that $\Delta x \Delta p \geq \hbar$. If we make the simplifying assumption that this means $(l\theta_0)(ml\omega_0)\geq\hbar$, what is the absolute longest time that we could balance the pencil for before it falls over?