match time calculation