a naive timer implementation to be improved (for the next blog post)