Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
b8c545f8
Commit
b8c545f8
authored
Jun 14, 2022
by
Zheng Jie
Browse files
[代码完善](master): 代码优化
parent
0d539c6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/MonitorServiceImpl.java
View file @
b8c545f8
...
...
@@ -153,8 +153,8 @@ public class MonitorServiceImpl implements MonitorService {
Util
.
sleep
(
time
);
long
[]
ticks
=
processor
.
getSystemCpuLoadTicks
();
while
(
Arrays
.
toString
(
prevTicks
).
equals
(
Arrays
.
toString
(
ticks
))
&&
time
<
1000
){
time
+=
10
;
Util
.
sleep
(
10
);
time
+=
25
;
Util
.
sleep
(
25
);
ticks
=
processor
.
getSystemCpuLoadTicks
();
}
long
user
=
ticks
[
CentralProcessor
.
TickType
.
USER
.
getIndex
()]
-
prevTicks
[
CentralProcessor
.
TickType
.
USER
.
getIndex
()];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment