Topic: Measuring execution time of a script (solved)
I'm not always on Linux, so I can't always use 'time'..
Is there a good Ruby way of measuring how long a program took to run?
Originally, I tried this:
a = DateTime.now
# Code here
b = DateTime.now
puts (b - a).to_s
But that gave me a rational number..
Is there a better/working solution?
Last edited by Trevoke (2008-10-14 10:41:23)