Sha256: 3670207f67484c2af04c1afea8153732ba83f5ba36fea28f71d7b5e6633efdad
Contents?: true
Size: 567 Bytes
Versions: 10
Compression:
Stored size: 567 Bytes
Contents
## # Timer Object in EventLoop # @!attribute [r] time # @return [Float] timeout length # @!attribute [r] callback # @return [Proc] proc to call when callbacks # @!attribute start_time # @return [Float] when timer should callbacks class EventLoop::Timer attr_reader :time, :callback attr_accessor :start_time # Init a timer with a time period and callback # @param [Float] time timeout length # @yield proc to call when callbacks def initialize(time, &callback) @time = time @callback = callback @start_time = Float::INFINITY end end
Version data entries
10 entries across 10 versions & 2 rubygems