Skip to content

Commit

Permalink
Remove inputUnit parameter of formatDuration
Browse files Browse the repository at this point in the history
The inputUnit parameter was not used anywhere and significantly
complicated the implementation of the formatDuration function.
Now, all inputs are assumed to be in microseconds which is consistent
with a few other methods in the date.tsx file.

Signed-off-by: James Ferguson <[email protected]>
  • Loading branch information
jamesfer committed Oct 6, 2020
1 parent 1e2f249 commit 782ccf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jaeger-ui/src/utils/date.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function formatSecondTime(duration: number) {
* 5000ms => 5s
* 1000μs => 1ms
*/
export function formatDuration(duration: number, inputUnit: string = 'microseconds'): string {
export function formatDuration(duration: number): string {
if (duration < 1) {
return `${_round(duration, 2)}μs`;
}
Expand Down

0 comments on commit 782ccf3

Please sign in to comment.