mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-11 22:42:04 +08:00
17 lines
227 B
Ruby
17 lines
227 B
Ruby
def time_plus(x)
|
|
time1 = Time.at(10000)
|
|
time2 = Time.at(10001)
|
|
|
|
x.report "+ fixnum" do
|
|
10000.times do
|
|
time1 + 100
|
|
end
|
|
end
|
|
|
|
x.report "+ float" do
|
|
10000.times do
|
|
time1 + 123.45
|
|
end
|
|
end
|
|
end
|