This commit is contained in:
Flummi
2021-01-25 20:30:39 +01:00
parent 6a4d3cb5bc
commit 2a10fd2e93
7 changed files with 74 additions and 46 deletions

View File

@@ -3,6 +3,6 @@ export default new class {
return (size / Math.pow(1024, i)).toFixed(2) * 1 + " " + ["B", "kB", "MB", "GB", "TB"][i];
}
calcSpeed(b, s) {
return `${(Math.round((b * 8 / s / 1e6) * 1e4) / 1e4).toFixed(2)} Mbit/s`;
return (Math.round((b * 8 / s / 1e6) * 1e4) / 1e4);
}
};