Adapt to the new timer interface.

Signed-off-by: mk124 <mk124a@gmail.com>