  The prompt emission of Gamma Ray Bursts extends from the early pulses
observed in gamma-rays (>15 keV) to very late flares of X-ray photons (0.3-10
keV). The duration of prompt gamma-ray pulses is rather constant while the
width of X-ray flares correlates with their peak time suggesting a possible
different origin. However, pulses and flares have similar spectral properties.
Considering internal and external shock scenarios, we derive how the energy and
duration of pulses scale with their time of occurrence and we compare with
observations. The absence of an observed correlation between prompt emission
pulse duration and its time of occurrence favours an "internal" origin and
confirms the earlier results of Ramirez-Ruiz & Fenimore. We show that also the
energetic and temporal properties of X-ray flares are consistent with being
produced by internal shocks between slow fireballs with a small contrast
between their bulk Lorentz factors. These results relax the requirement of a
long lasting central engine to explain the latest X-ray flares.
