Skip to content
Snippets Groups Projects
Commit 645cf109 authored by syuilo's avatar syuilo
Browse files

refactor: fix type

parent 510de876
No related branches found
No related tags found
No related merge requests found
......@@ -36,8 +36,8 @@ export default function() {
tx: round(Math.max(0, netStats.tx_sec)),
},
fs: {
r: round(Math.max(0, fsStats.rIO_sec)),
w: round(Math.max(0, fsStats.wIO_sec)),
r: round(Math.max(0, fsStats.rIO_sec ?? 0)),
w: round(Math.max(0, fsStats.wIO_sec ?? 0)),
},
};
ev.emit('serverStats', stats);
......@@ -51,9 +51,9 @@ export default function() {
}
// CPU STAT
function cpuUsage() {
function cpuUsage(): Promise<number> {
return new Promise((res, rej) => {
osUtils.cpuUsage((cpuUsage: number) => {
osUtils.cpuUsage((cpuUsage) => {
res(cpuUsage);
});
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment