Sha256: d20bfd55d780ef62852a3313afc7c9d58f2cf19833b48c8dafc66df9af5317c6

Contents?: true

Size: 304 Bytes

Versions: 18

Compression:

Stored size: 304 Bytes

Contents

module Gosuplus
  class Timer
    def initialize(time, time_start = 0)
      @time, @time_ready = time_start, time
    end

    def update
      @time += 1 if @time < @time_ready
    end

    def ready?
      @time_ready == @time
    end

    def reset
      @time = 0
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
Gosuplus-1.0.261 lib/Gosuplus/timer.rb
Gosuplus-1.0.26 lib/Gosuplus/timer.rb
Gosuplus-1.0.25 lib/Gosuplus/timer.rb
Gosuplus-1.0.24 lib/Gosuplus/timer.rb
Gosuplus-1.0.23 lib/Gosuplus/timer.rb
Gosuplus-1.0.22 lib/Gosuplus/timer.rb
Gosuplus-1.0.21 lib/Gosuplus/timer.rb
Gosuplus-1.0.20 lib/Gosuplus/timer.rb
Gosuplus-1.0.19 lib/Gosuplus/timer.rb
Gosuplus-1.0.18 lib/Gosuplus/timer.rb
Gosuplus-1.0.17 lib/Gosuplus/timer.rb
Gosuplus-1.0.16 lib/Gosuplus/timer.rb
Gosuplus-1.0.15 lib/Gosuplus/timer.rb
Gosuplus-1.0.14 lib/Gosuplus/timer.rb
Gosuplus-1.0.13 lib/Gosuplus/timer.rb
Gosuplus-1.0.12 lib/Gosuplus/timer.rb
Gosuplus-1.0.11 lib/Gosuplus/timer.rb
Gosuplus-1.0.1 lib/Gosuplus/timer.rb