Sha256: 7854666ecccc901cd66d8b81e6701672a34035a8d3da0de098a3616db31ab427

Contents?: true

Size: 214 Bytes

Versions: 2

Compression:

Stored size: 214 Bytes

Contents

require 'bundler/setup'
require 'libev_scheduler'

Fiber.set_scheduler Libev::Scheduler.new
Fiber.schedule do
  puts "going to sleep"
  t0 = Time.now
  sleep 1.5
  puts "woke up after #{Time.now - t0} seconds"
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
libev_scheduler-0.2 examples/sleep.rb
libev_scheduler-0.1 examples/sleep.rb