diff options
Diffstat (limited to 'jni/ruby/sample/time.rb')
-rw-r--r-- | jni/ruby/sample/time.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/jni/ruby/sample/time.rb b/jni/ruby/sample/time.rb new file mode 100644 index 0000000..e169120 --- /dev/null +++ b/jni/ruby/sample/time.rb @@ -0,0 +1,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) |