We calculate the hydrodynamic timescales for a spherical ultrarelativi
stic shell that is decelerated by the ISM and discuss the possible rel
ations between these timescales and the observed temporal structure in
gamma-ray bursts. We suggest that the bursts' duration is related to
the deceleration time, the variability is related to the ISM inhomogen
eities, and that precursors are related to internal shocks within the
shell. Good agreement can be achieved for these quantities with reason
able, not fine-tuned, astrophysical parameters. The difference between
Newtonian and relativistic reverse shocks may lead to the observed bi
modal distribution of bursts' durations.