mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
pstats: Fix clock skew handling when frames arrive out-of-order
This commit is contained in:
parent
9784d46e95
commit
264fe5e057
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user