Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
douglas-raillard-arm committed Dec 22, 2023
1 parent 0f46b80 commit 7f2c49a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tools/analysis/trace-tools/src/bin/trace-dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,15 @@ fn main() -> Result<(), Box<dyn Error>> {

// TODO: make that optional
let unique_timestamps = {
let mut last = 0;
move |ts: Timestamp| {
let ts = if ts == last { ts + 1 } else { ts };
last = ts;
// We make the timestamp unique assuming it will be manipulated as an f64 by consumers
let mut last = 0.0;
move |mut ts: Timestamp| {
let mut _ts = ts as f64;
while _ts == last {
ts = ts + 1;
_ts = ts as f64;
}
last = _ts;
ts
}
};
Expand Down

0 comments on commit 7f2c49a

Please sign in to comment.