Measure generation time for a derivative if LIBCLAD_TIMING is set.