File: timeout_stub.rb

package info (click to toggle)
ruby-activeldap 4.0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,524 kB
  • ctags: 1,815
  • sloc: ruby: 17,656; makefile: 15
file content (17 lines) | stat: -rw-r--r-- 265 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'timeout'

module Timeout
  # STUB
  def Timeout.alarm(sec, exception=Timeout::Error, &block)
    timeout(sec, exception, &block)
  end
end # Timeout

if __FILE__ == $0
  require 'time'
  Timeout.alarm(2) do 
    loop do 
      p Time.now
    end
  end
end