An efficient Test Selection Algorithm for Real-Time Systems