Preliminary debugging of timer.c

This is only the beginning... more to follow.