看板 Ruby 關於我們 聯絡資訊
請問一下這一個是用來測試執行時間嗎 time.rb #! /usr/local/bin/ruby cmd = ARGV.join(" ") b = Time.now system(cmd) e = Time.now ut, st, cut, cst = Time.times.to_a total = (e - b).to_f STDERR.printf "%11.1f real %11.1f user %11.1f sys\n", total, cut, cst -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 222.250.106.144
WanCW:是的,他會印出程式執行花費的時間 08/02 21:24