Memory stats fix

@HansMolenveld
pull/8/head
chdanielmueller 2020-06-28 14:16:06 +02:00
rodzic ef45321c78
commit 48d4d77cdb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B4BA5D483C8735DB
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -13,13 +13,13 @@ var getBytes = function(s) {
var bytes = 0;
var value = s.match(/\d+/g)[0];
var unit = s.match(/[a-zA-Z]+/g)[0].toUpperCase();
if (unit == 'KB') {
if (unit == 'KB' || unit == 'KIB') {
return value*1024;
} else if (unit == 'MB') {
} else if (unit == 'MB' || unit == 'MIB') {
return value*1024*1024;
} else if (unit == 'GB') {
} else if (unit == 'GB' || unit == 'GIB') {
return value*1024*1024*1024;
} else if (unit == 'TB') {
} else if (unit == 'TB' || unit == 'TIB') {
return value*1024*1024*1024*1024;
}
return bytes;