Sha256: 773cbf99f6ce6b74c464b70bd834067e22e53d2a28007220d24862f3252ea886
Contents?: true
Size: 473 Bytes
Versions: 43
Compression:
Stored size: 473 Bytes
Contents
# -*- encoding: utf-8; mode: ruby -*- require "system_timer" module Bunny # Used for Ruby before 1.9 class SystemTimer # Executes a block of code, raising if the execution does not finish # in the alloted period of time, in seconds. def self.timeout(seconds, exception = nil) if seconds ::SystemTimer.timeout_after(seconds, exception) do yield end else yield end end end # SystemTimer end # Bunny
Version data entries
43 entries across 43 versions & 1 rubygems