情報学部 | 菅沼ホーム | 目次 | 索引 |
p Time.at(1246000000) # => Fri Jun 26 16:06:40 +0900 2009
p Time.local(2009, 6) # => Mon Jun 01 00:00:00 +0900 2009
n = 10000000 while n > 0 n -= 1 end print "user = ", Process.times[0], "\n" # user = 3.447 print "system = ", Process.times[1] # system = 0.031 # 以下の方法でも可能 #print "user = ", Process.times.utime, "\n" #print "system = ", Process.times.stime
p Time.now.strftime("%B") # => "June" p Time.now.mon # => 6
p Time.now.strftime("%B") # => "June" p Time.now.mon # => 6
$KCODE = "SJIS" p Time.now.to_a # => [33, 35, 9, 28, 6, 2009, 0, 179, false, "東京 (標準時)"]
情報学部 | 菅沼ホーム | 目次 | 索引 |