  We propose a discretization of vector fields that are Hamiltonian up to
multiplication by a positive function on the phase space that may be
interpreted as a time reparametrization. We prove that our method is structure
preserving in the sense that the discrete flow is interpolated to arbitrary
order by the flow of a continuous system possessing the same structure. In
particular, our discretization preserves a smooth measure on the phase space to
arbitrary order. We present applications to a remarkable class of nonholonomic
mechanical systems that allow Hamiltonization. To our best knowledge, these
results provide the first occurrence in the literature of a measure preserving
discretization of measure preserving nonholonomic systems.
