check-ping.rb: Use Integer#times instead