A timer as a context manager