Sha256: 3b0617b5d2c94c7f02725c1192f4f037a1f7cf1314fb6767a385bc47f489846b
Contents?: true
Size: 474 Bytes
Versions: 1
Compression:
Stored size: 474 Bytes
Contents
require 'rubygems' require 'test/unit' $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'glutton_ratelimit' class Test::Unit::TestCase end def timed_run ratelimiter, passes = 1 before_last_invocation = 0 start_time = Time.now (passes * ratelimiter.executions + 1).times do |n| ratelimiter.wait before_last_invocation = Time.now yield end before_last_invocation - start_time end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
glutton_ratelimit-0.1.0 | test/helper.rb |