فهرست منبع

pstats: Fix clock skew handling when frames arrive out-of-order

rdb 3 سال پیش
والد
کامیت
264fe5e057
1فایلهای تغییر یافته به همراه12 افزوده شده و 0 حذف شده
  1. 12 0
      pandatool/src/pstatserver/pStatTimeline.cxx

+ 12 - 0
pandatool/src/pstatserver/pStatTimeline.cxx

@@ -230,6 +230,18 @@ update_bars(int thread_index, int frame_number) {
            << format_number(delta, GBU_show_units | GBU_ms)
            << " in frame " << frame_number << " of thread "
            << thread_index << "\n";
+
+      // Move all bars after this frame to the right by this amount.
+      for (ThreadRow &thread_row : _threads) {
+        for (Row &row : thread_row._rows) {
+          for (ColorBar &bar : row) {
+            if (bar._frame_number > frame_number) {
+              bar._start += delta;
+              bar._end += delta;
+            }
+          }
+        }
+      }
     }
     prev = time;