Timescales of cognition in the brain