  We model the dynamics of avalanches in granular assemblies in partly filled
rotating cylinders using a mean-field approach. We show that, upon varying the
cylinder angular velocity $\omega$, the system undergoes a hysteresis cycle
between an intermittent and a continuous flow regimes. In the intermittent flow
regime, and approaching the transition, the avalanche duration exhibits
critical slowing down with a temporal power-law divergence. Upon adding a white
noise term, and close to the transition, the distribution of avalanche
durations is also a power-law. The hysteresis, as well as the statistics of
avalanche durations, are in good qualitative agreement with recent experiments
in partly filled rotating cylinders.
