Rate of evolution in a changing environment