mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Bits
This commit is contained in:
parent
dc95cf3447
commit
6540c5460e
4 changed files with 75 additions and 75 deletions
|
@ -363,9 +363,9 @@ export const nFormatter = (num: number, digits: number): string => {
|
|||
);
|
||||
};
|
||||
|
||||
export const formatSpeedBytes = (speed: number): string => {
|
||||
// source: en.wikipedia.org/wiki/Data-rate_units#Conversion_table
|
||||
const suffix = ["B/s", "kB/s", "MB/s", "GB/s"];
|
||||
export const formatSpeedBits = (speed: number): string => {
|
||||
// source: https://en.wikipedia.org/wiki/Data-rate_units#Conversion_table
|
||||
const suffix = ["bit/s", "kbit/s", "Mbit/s", "Gbit/s"];
|
||||
let index = 0;
|
||||
while (speed > 1000) {
|
||||
index++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue