Code Cleanup
This commit is contained in:
parent
e84d203729
commit
a22e0e468f
6
main.js
6
main.js
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user