Patch from Robert de Bath to substantially simplify timing.c.