In this paper, we present the first temporal characterization of betatron X-ray radiation. Results obtained
from time resolved x-ray diffraction experiments, for which the ultra fast phase transition of non thermal melting
of InSb was used, indicates that the x-ray pulse duration is less than 1 ps. We then propose a novel technique
to improve the spectral and flux properties of the x-ray source. The energy and the flux can be enhanced when
the electron beam propagates and oscillates in a tailored plasma density profile.