Sha256: e2ac7bb2ec04240315cce5f0c506890c26483f726abfa86142fb01e49209084a

Contents?: true

Size: 348 Bytes

Versions: 7

Compression:

Stored size: 348 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Larynx::RestartableTimer do

  it "should allow timer to be restarted" do
    start = Time.now
    em do
      timer = Larynx::RestartableTimer.new(1) { done }
      EM::Timer.new(0.5) { timer.restart }
    end
    (Time.now-start).should be_close(1.5, 0.2)
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
larynx-0.1.6 spec/larynx/eventmachince_spec.rb
larynx-0.1.5 spec/larynx/eventmachince_spec.rb
larynx-0.1.4 spec/larynx/eventmachince_spec.rb
larynx-0.1.3 spec/larynx/eventmachince_spec.rb
larynx-0.1.2 spec/larynx/eventmachince_spec.rb
larynx-0.1.1 spec/larynx/eventmachince_spec.rb
larynx-0.1.0 spec/larynx/eventmachince_spec.rb