Simplify timing code slightly.