summaryrefslogtreecommitdiff
path: root/sample/time.rb
blob: e16912052ee819d6ffb3d777a31f06bf5bb4c95b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#! /usr/bin/env ruby

b = Time.now
system(*ARGV)
e = Time.now

tms = Process.times
real = e - b
user = tms.cutime
sys = tms.cstime

STDERR.printf("%11.1f real %11.1f user %11.1f sys\n", real, user, sys)