From 3db12e8b236ac8f88db8eb4690d10e4a3b8dbcd4 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 16 Jan 1998 12:13:05 +0000 Subject: Initial revision git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sample/time.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 sample/time.rb (limited to 'sample/time.rb') diff --git a/sample/time.rb b/sample/time.rb new file mode 100644 index 0000000000..f4f4ec4883 --- /dev/null +++ b/sample/time.rb @@ -0,0 +1,8 @@ +#! /usr/local/bin/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 -- cgit v1.2.3