Sha256: 77d31b0312eef20fe7656720b74c449548d06e3e6ec2926d3f21ede65e35dde8

Contents?: true

Size: 345 Bytes

Versions: 7

Compression:

Stored size: 345 Bytes

Contents

# -*- encoding: utf-8; mode: ruby -*-

require "system_timer"

module Bunny
  # Used for Ruby before 1.9
  class SystemTimer
    def self.timeout(seconds, exception)
      if seconds
        ::SystemTimer.timeout_after(seconds, exception) do
          yield
        end
      else
        yield
      end
    end
  end # SystemTimer
end # Bunny

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bunny-0.9.0.pre13 lib/bunny/system_timer.rb
bunny-0.9.0.pre12 lib/bunny/system_timer.rb
bunny-0.9.0.pre11 lib/bunny/system_timer.rb
bunny-0.9.0.pre10 lib/bunny/system_timer.rb
bunny-0.9.0.pre9 lib/bunny/system_timer.rb
bunny-0.9.0.pre8 lib/bunny/system_timer.rb
bunny-0.9.0.pre7 lib/bunny/system_timer.rb