[前][次][番号順一覧][スレッド一覧]

ruby-changes:15023

From: akr <ko1@a...>
Date: Sat, 13 Mar 2010 03:25:33 +0900 (JST)
Subject: [ruby-changes:15023] Ruby:r26898 (trunk): * tool/transcode-tblgen.rb: show cosumed time at last.

akr	2010-03-13 03:25:13 +0900 (Sat, 13 Mar 2010)

  New Revision: 26898

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26898

  Log:
    * tool/transcode-tblgen.rb: show cosumed time at last.

  Modified files:
    trunk/ChangeLog
    trunk/tool/transcode-tblgen.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 26897)
+++ ChangeLog	(revision 26898)
@@ -1,3 +1,7 @@
+Sat Mar 13 03:24:15 2010  Tanaka Akira  <akr@f...>
+
+	* tool/transcode-tblgen.rb: show cosumed time at last.
+
 Sat Mar 13 00:44:20 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* file.c (rb_file_s_basename): check encoding of suffix.
Index: tool/transcode-tblgen.rb
===================================================================
--- tool/transcode-tblgen.rb	(revision 26897)
+++ tool/transcode-tblgen.rb	(revision 26898)
@@ -773,6 +773,8 @@
 end
 
 if __FILE__ == $0
+  start_time = Time.now
+
   output_filename = nil
   verbose_mode = false
   force_mode = false
@@ -861,7 +863,9 @@
     FileUtils.mkdir_p(File.dirname(output_filename))
     File.open(new_filename, "wb") {|f| f << result }
     File.rename(new_filename, output_filename)
-    STDERR.puts "done." if VERBOSE_MODE
+    tms = Process.times
+    elapsed = Time.now - start_time
+    STDERR.puts "done.  (#{'%.2f' % tms.utime}user #{'%.2f' % tms.stime}system #{'%.2f' % elapsed}elapsed)" if VERBOSE_MODE
   else
     print result
   end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]