Files
RubyMotion/test/Benchmark/app/benchmark/time/comparable.rb
2013-11-20 23:48:24 +09:00

23 lines
298 B
Ruby

def time_comparable(x)
time1 = Time.at(10000)
time2 = Time.at(10001)
x.report "<" do
100000.times do
time1 < time2
end
end
x.report ">" do
100000.times do
time1 > time2
end
end
x.report "==" do
100000.times do
time1 == time2
end
end
end