  The detection of bright X-ray flares superimposed on the regular afterglow
decay in Swift gamma-ray bursts has triggered theoretical speculations on their
origin. We study the temporal properties of flares due to internal dissipation
and external shock mechanisms. We first show that at least a sizable fraction
of the flares cannot be related to external shock mechanisms, since external
shock flares evolve on much longer time scales than observed. We then study
flares from internal dissipation, showing that the temporal properties allow us
to distinguish the emission of slow early shells from that of late faster
shells. We show that, due to the rapid evolution of the detected flares, it is
most likely that the flares are produced by relatively fast shells ejected by
the central engine shortly before they are observed. This implies that the
central engine must be active for, in some cases, as long as one day. We
finally discuss the constraints and implications that this observation has on
the properties and physics of the inner engine, and we elaborate on possible
future observational tests on the flare sample to further understand their
origin and physics.
