Code Cleanup

This commit is contained in:
snxraven 2021-09-23 21:53:30 -04:00
parent e84d203729
commit a22e0e468f

View File

@ -114,7 +114,7 @@ async function update() {
checkDiskSpace('/').then((diskSpace) => {
free.m(function (err, freeRamMB) {
cpuUsage(perc => lb.append(lb.left + require("os").userInfo().username.lbFg("#fff") + " | CPU: ".lbFg("#fff") + (Math.round(perc * 100) / 100).toFixed(2).lbFg("#fff") + " | Mem: ".lbFg("#fff") + freeRamMB[0].free.lbFg("#fff") + " MB".lbFg("#fff") + " | ".lbFg("#fff") + formatBytes(diskSpace.free).toString().lbFg("#fff") + " of ".lbFg("#fff") + formatBytes(diskSpace.size).toString().lbFg("#fff")));
cpuUsage(perc => lb.append(lb.left + require("os").userInfo().username.lbFg("#fff") + " | CPU: ".lbFg("#fff") + (Math.round(perc * 100) / 100).toFixed(2).lbFg("#fff") + " | Mem: ".lbFg("#fff") + freeRamMB[0].free.lbFg("#fff") + " MB".lbFg("#fff") + " | ".lbFg("#fff") + formatBytes(diskSpace.free).toString().lbFg("#fff")));
});
})
@ -152,5 +152,5 @@ update()
// Update current time every second
setTimeout(function () {
update()
setInterval(update, 1500)
}, 1500 - new Date().getMilliseconds())
setInterval(update, 1200)
}, 1200 - new Date().getMilliseconds())