sample/time.rb


DEFINITIONS

This source file includes following functions.


   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.to_a
   7  total = (e - b).to_f
   8  printf STDERR, "%11.1f real %11.1f user %11.1f sys\n", total, cut, cst