To solve the problem of time-aware test case prioritization, a hybrid algorithm composed of integer linear programming and the genetic algorithm ( ILP-GA) is proposed. First, the test case suite which can maximize the number of covered program entities and satisfy time constraints is selected by integer linear programming. Secondly, the individual is encoded according to the cover matrices of entities, and the coverage rate of program entities is used as the fitness function and the genetic algorithm is used to prioritize the selected test cases. Five typical open source projects are selected as benchmark programs. Branch and method are selected as program entities, and time constraint percentages are 25% and 75%. The experimental results show that the ILP-GA convergence has faster speed and better stability than ILP-additional and ILP-total in most cases, which contributes to the detection of software defects as early as possible and reduces the software testing costs.