void ShowAnyPendingFastestLap(DataSample data, TimeSpan relativeTime) { if (timeToNoteFastestLap == null || timeToNoteFastestLap.Value >= data.Telemetry.SessionTime) return; var fastLap = new OverlayData.FastLap { StartTime = (int)relativeTime.TotalSeconds, Time = lastFastestLap.Time.TotalSeconds, Driver = new OverlayData.Driver { UserName = lastFastestLap.Driver.UserName, CarNumber = lastFastestLap.Driver.CarNumber } }; TraceInfo.WriteLine("{0} Showing Driver {1} recorded a new fast lap of {2:0.00}", data.Telemetry.SessionTimeSpan, lastFastestLap.Driver.UserName, lastFastestLap.Time.TotalSeconds); overlayData.FastestLaps.Add(fastLap); timeToNoteFastestLap = null; }
void ShowAnyPendingFastestLap(DataSample data, TimeSpan relativeTime) { if (timeToNoteFastestLap == null || timeToNoteFastestLap.Value >= data.Telemetry.SessionTime) { return; } var fastLap = new OverlayData.FastLap { StartTime = (int)relativeTime.TotalSeconds, Time = lastFastestLap.Time.TotalSeconds, Driver = new OverlayData.Driver { UserName = lastFastestLap.Driver.UserName, CarNumber = lastFastestLap.Driver.CarNumber } }; TraceInfo.WriteLine("{0} Showing Driver {1} recorded a new fast lap of {2:0.00}", data.Telemetry.SessionTimeSpan, lastFastestLap.Driver.UserName, lastFastestLap.Time.TotalSeconds); overlayData.FastestLaps.Add(fastLap); timeToNoteFastestLap = null; }