Simplify timer.h to have fewer platform-dependent if's.