AppFolio Interview Question

How would you implement a feature like JavaScript's setTimeout() in any language other than JavaScript?