The TimeCompareWidget from the "Ecclestone TV" Widgets Set displays the last three laptimes and compares them to the ones of the next car in front or behind.

Times are compared to the car (next in front or behind) being closer to you. You can influence this decision with the preferNextInFront property. To make an early decision, the gap to next behind at the beginning of sector 3 is compared to the gap to next in front at S/F line.

This Widget is only displayed every few laps depending on the displayEveryXLaps property. When you pass the S/F line and the car next in front is closer than the car next behind, the Widget is displayed immediately. If next behind is closer, it is displayed when that car crosses the S/F line.

The Widget is displayed for the amount of seconds defined in the visibleTime property. All the rest of the time this Widget is invisible.