File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ def assert_cpu_load(&)
5
5
# Wait enough time to have measurable load
6
6
cpu_usage = 0
7
7
9 .times do
8
- sleep 1
8
+ sleep 1 .seconds
9
9
cpu_usage = yield
10
10
11
11
break if 0 < cpu_usage <= 100
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ describe Hardware::PID::Stat do
20
20
Hardware ::PID .each do |pid |
21
21
spawn do
22
22
stat = pid.stat
23
- sleep 4
23
+ sleep 4 .seconds
24
24
channel.send stat.cpu_usage!
25
25
rescue ex : Hardware ::Error
26
26
channel.send 0
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ struct Hardware::PID
62
62
63
63
# Returns `/proc/``#pid``/exe` if readable.
64
64
def exe : String
65
- File .real_path " /proc/#{ @number } /exe"
65
+ File .realpath " /proc/#{ @number } /exe"
66
66
end
67
67
68
68
def exists ? : Bool
You can’t perform that action at this time.
0 commit comments