mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-18 07:44:26 +01:00
upgrade & opt
- flutter 3.0.1 - show snackbar when no server to ping - server detail page replace nice to iowait - make script show stdout when error
This commit is contained in:
@@ -45,5 +45,12 @@ class Cpu2Status {
|
||||
return used.isNaN ? 0 : used * 100;
|
||||
}
|
||||
|
||||
double get iowait {
|
||||
if (now.length != pre.length) return 0;
|
||||
final delta = now[0].iowait - pre[0].iowait;
|
||||
final used = delta / totalDelta;
|
||||
return used.isNaN ? 0 : used * 100;
|
||||
}
|
||||
|
||||
double get idle => 100 - usedPercent();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user