Fixed method to compute gaps at any race time.