Based on the concept of group velocity, the relations between traversal time of spin-polarized electrons in ferromagnetic/semiconductor(insulator)/ferromagnetic heterojunction and relative magnetic moment angle in two ferromagnetic layers are studied. The results show that when the middle layer is semiconductor layer, influenced by the Rashba spin-orbit coupling, the minimum transverse times difference between the spin-up and down electrons can appear if the relative angle values in two ferromagnetic layers are nearly the π/2 and 3π/2, respectively. When the middle layer is insulator, the transverse time difference between the different spin orientations can be varied with the potential barrier heights and flip if the height exceeds a critical value.