[#3986] Re: Principle of least effort -- another Ruby virtue. — Andrew Hunt <andy@...>

> Principle of Least Effort.

14 messages 2000/07/14

[#4043] What are you using Ruby for? — Dave Thomas <Dave@...>

16 messages 2000/07/16

[#4139] Facilitating Ruby self-propagation with the rig-it autopolymorph application. — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/07/20

[ruby-talk:04186] How-to time short intervals?

From: Robert Feldt <feldt@...>
Date: 2000-07-24 12:59:15 UTC
List: ruby-talk #4186
I'd like to time some funcs implemented in an extension but they are
really fast so:

start = Time.now
my_ext_function(args)
elapsed_time = Time.now - start

will not do (resolution is microsecs?). The obvious way is to repeat the
call a large number of times and then take an average but I wonder if
there is any other way to time (really) short time intervals?
(Platform-specific syscalls not allowed!)

Thanks in advance,

Robert


In This Thread

Prev Next