mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-19 23:50:20 +08:00
23 lines
298 B
Ruby
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
|