diff options
Diffstat (limited to 'web/assets')
| -rw-r--r-- | web/assets/js/util/common.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/web/assets/js/util/common.js b/web/assets/js/util/common.js index ab642849..d35c5208 100644 --- a/web/assets/js/util/common.js +++ b/web/assets/js/util/common.js @@ -22,6 +22,19 @@ function sizeFormat(size) { } } +function cpuSpeedFormat(speed) { + const GHz = speed / 1000; + return GHz.toFixed(2) + " GHz"; +} + +function cpuCoreFormat(cores) { + if (cores === 1) { + return "1 Core"; + } else { + return cores + " Cores"; + } +} + function base64(str) { return Base64.encode(str); } |
