Sleeping

Hi!
looks like we have an additional random-function:

irb(main):004:0> sleep 0.9
=> 0 in about 1 of 10 cases
irb(main):005:0> sleep 0.9
=> 1
perhaps sleep should return float?

Furthermore, if the process is stopped, while the time goes by,
  it sleeps forever (it tests time ==, instead of time >= ???)

this should be corrected!

Opti

This is depending on the operating-system, so its not the fault of Ruby.

Opti

···

On 2016-10-28 16:01, Die Optimisten wrote:

Hi!
looks like we have an additional random-function:

irb(main):004:0> sleep 0.9
=> 0 in about 1 of 10 cases
irb(main):005:0> sleep 0.9
=> 1
perhaps sleep should return float?

Furthermore, if the process is stopped, while the time goes by,
it sleeps forever (it tests time ==, instead of time >= ???)

Hi!
looks like we have an additional random-function:

irb(main):004:0> sleep 0.9
=> 0 in about 1 of 10 cases
irb(main):005:0> sleep 0.9
=> 1
perhaps sleep should return float?

From the documentation:

···

On Oct 28, 2016, at 07:01, Die Optimisten <inform@die-optimisten.net> wrote:

Suspends the current thread for duration seconds (which may be
any number, including a Float with fractional seconds). Returns the actual
number of seconds slept (rounded)