home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / rbemx144.zip / ruby-1.4.4 / sample / time.rb < prev    next >
Text File  |  1998-01-16  |  204b  |  9 lines

  1. #! /usr/local/bin/ruby
  2. cmd = ARGV.join(" ")
  3. b = Time.now
  4. system(cmd)
  5. e = Time.now
  6. ut, st, cut, cst = Time.times
  7. total = (e - b).to_f
  8. printf STDERR, "%11.1f real %11.1f user %11.1f sys\n", total, cut, cst
  9.