I think I got the point. For example in diffserv3: tdiff values -2, 2, -1 for tins 1, 0, 2, then:"if (tdiff<=0 || tdiff<=best_time)" returns best_time -1 and tin 2. Highest priority tin with packet overdue."if (tdiff<=best_time)" would return best_time -2 and tin 1. Not the highest priority tin with packet overdue. Thank you,George