Skip to content

Commit

Permalink
Realign NT timestamps before connection
Browse files Browse the repository at this point in the history
  • Loading branch information
jwbonner committed Oct 29, 2023
1 parent b3a5229 commit 2216470
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/shared/log/Log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ export default class Log {
while (cache.timestamps.length >= 2 && cache.timestamps[1] <= timestamp) {
cache.timestamps.shift();
}
if (cache.timestamps.length > 0 && cache.timestamps[0] < timestamp) {
cache.timestamps[0] = timestamp;
}
});
Object.values(this.fields).forEach((field) => {
field.clearBeforeTime(timestamp);
Expand Down
3 changes: 3 additions & 0 deletions src/shared/log/LogField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export default class LogField {
this.data.values.shift();
this.stripingReference = !this.stripingReference;
}
if (this.data.timestamps.length > 0 && this.data.timestamps[0] < timestamp) {
this.data.timestamps[0] = timestamp;
}
}

/** Returns the values in the specified timestamp range. */
Expand Down

0 comments on commit 2216470

Please sign in to comment.