From 7a1739d72464270033992d73761b24caee8a128c Mon Sep 17 00:00:00 2001 From: Julien Reichardt Date: Mon, 30 Jul 2018 11:51:54 +0200 Subject: [PATCH] Fix minor doc issues --- shard.yml | 2 +- src/hardware/net.cr | 4 ++-- src/hardware/pid.cr | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/shard.yml b/shard.yml index a13792c..cba1bdd 100644 --- a/shard.yml +++ b/shard.yml @@ -5,6 +5,6 @@ authors: - bararchy - Julien Reichardt -crystal: 0.24.2 +crystal: 0.25.1 license: MIT diff --git a/src/hardware/net.cr b/src/hardware/net.cr index a4d9ce6..12f18ff 100644 --- a/src/hardware/net.cr +++ b/src/hardware/net.cr @@ -5,8 +5,8 @@ # net = Hardware::Net.new # System network stats # old_in, old_out = net.in_octets, net.out_octets # loop do -# net = Hardware::Net.new # Update network stats # sleep 1 +# net = Hardware::Net.new # Update network stats # now_in, now_out = net.in_octets, net.out_octets # puts "down: #{(now_in - old_in) / 1000}kB/s | up: #{(now_out - old_out) / 1000}kB/s" # => down: 427kB/s | up: 24kB/s # old_in, old_out = now_in, now_out @@ -42,7 +42,7 @@ struct Hardware::Net OutMcastOctets InBcastOctets OutBcastOctets - InCsumEsrrors + InCsumErrors InNoEctPkts InEct1Pkts InEct0Pkts diff --git a/src/hardware/pid.cr b/src/hardware/pid.cr index 125f3ba..d0875a4 100644 --- a/src/hardware/pid.cr +++ b/src/hardware/pid.cr @@ -55,8 +55,7 @@ struct Hardware::PID def self.get_pids(executable : String) pids = Array(Int32).new all(cpu_time: false, cpu_total: false) do |pid| - pid_name = pid.name - pids << pid.pid if pid_name == executable + pids << pid.pid if pid.name == executable end pids end