Skip to content

Commit c3f5752

Browse files
committed
Fix deprecation warnings
1 parent 86f0ebf commit c3f5752

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

spec/cpu_spec.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def assert_cpu_load(&)
55
# Wait enough time to have measurable load
66
cpu_usage = 0
77
9.times do
8-
sleep 1
8+
sleep 1.seconds
99
cpu_usage = yield
1010

1111
break if 0 < cpu_usage <= 100

spec/pid/stat_spec.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe Hardware::PID::Stat do
2020
Hardware::PID.each do |pid|
2121
spawn do
2222
stat = pid.stat
23-
sleep 4
23+
sleep 4.seconds
2424
channel.send stat.cpu_usage!
2525
rescue ex : Hardware::Error
2626
channel.send 0

src/pid.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct Hardware::PID
6262

6363
# Returns `/proc/``#pid``/exe` if readable.
6464
def exe : String
65-
File.real_path "/proc/#{@number}/exe"
65+
File.realpath "/proc/#{@number}/exe"
6666
end
6767

6868
def exists? : Bool

0 commit comments

Comments
 (0)