INNER CODE UNIT · JavaScript

bytes

vdsm/virtual-dsm · web/js/script.js:285

    var bytes = Number(value) * Math.pow(1024, powers[unit]);

    if (!Number.isFinite(bytes) || bytes < 0) {
        return null;
    }

    return bytes;
}

function estimateProgress(bytes) {

    var boundary = 512 * 1024 * 1024;
    var previousBoundary = 0;

    while (bytes > boundary) {
        previousBoundary = boundary;
        boundary *= 2;
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…