From: matz@... (Yukihiro Matsumoto) Date: 2000-09-04T17:03:49+09:00 Subject: [ruby-talk:4771] Re: unix 'time' in Ruby? Hi. In message "[ruby-talk:4769] unix 'time' in Ruby?" on 00/09/04, Robert Feldt writes: |Is there a way to get the actual processing time of a Ruby |thread/script/app similar to unix 'time' command? (from inside Ruby of |course... ;-)) Time#times may help. Sample: #! /usr/bin/env ruby cmd = ARGV.join(" ") b = Time.now system(cmd) e = Time.now ut, st, cut, cst = Time.times total = (e - b).to_f printf STDERR, "%11.1f real %11.1f user %11.1f sys\n", total, cut, cst In addition Time class in general is pretty useful. matz.