Quenching timescales of galaxies in the EAGLE simulations