Skip to content

Commit

Permalink
convert data var directly
Browse files Browse the repository at this point in the history
  • Loading branch information
DomGarguilo committed Oct 22, 2024
1 parent 68c6d1b commit 952cfdb
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ $(document).ready(function () {
"columnDefs": [{
"targets": "duration",
"render": function (data, type, row) {
// incoming data is in nanoseconds
const millisValue = data / 1_000_000;
if (type === 'display') data = timeDuration(millisValue);
data = data / 1_000_000; // convert from nanos to millis
if (type === 'display') data = timeDuration(data);
return data;
}
},
Expand Down

0 comments on commit 952cfdb

Please sign in to comment.