diff --git a/relays.js b/relays.js index 4f536a2..9c0ad93 100644 --- a/relays.js +++ b/relays.js @@ -8,8 +8,8 @@ function humanByteSize(input) { return '0 B'; } - const i = Math.floor(Math.log(input) / Math.log(1024)); - return (input / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i]; + const i = Math.floor(Math.log(input) / Math.log(1000)); + return (input / Math.pow(1000, i)).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i]; } // Convert seconds to human friendly time, with days