Speed up add_timer() in debug mode.

It does not become the bottleneck unless people mess with timers though.