  We derive a nearly optimal upper bound on the running time in the adiabatic
theorem for a switching family of Hamiltonians. We assume the switching
Hamiltonian is in the Gevrey class $G^\alpha$ as a function of time, and we
show that the error in adiabatic approximation remains small for running times
of order $g^{-2}\,|\ln\,g\,|^{6\alpha}$. Here $g$ denotes the minimal spectral
gap between the eigenvalue(s) of interest and the rest of the spectrum of the
instantaneous Hamiltonian.
