Nonautonomous Hamiltonians