The time-of-flight detector for the ALICE experiment