Sha256: 097d598b7caeda6153aa46464a17e6ba6874e220a5b61badd082abbaf0d76d95

Contents?: true

Size: 527 Bytes

Versions: 64

Compression:

Stored size: 527 Bytes

Contents

# encoding: utf-8

require "logstash/namespace"

module LogStash
  class TimestampParserError < StandardError; end

  class Timestamp
    include Comparable

    # TODO (colin) implement in Java
    def <=>(other)
      self.time <=> other.time
    end

    def eql?(other)
      self.== other
    end

    # TODO (colin) implement in Java
    def +(other)
      self.time + other
    end

    # TODO (colin) implement in Java
    def -(value)
      self.time - (value.is_a?(Timestamp) ? value.time : value)
    end

  end
end

Version data entries

64 entries across 64 versions & 6 rubygems

Version Path
logstash-output-scalyr-0.2.1.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.2.0 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.2.0.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.26.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.25.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.24.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.23.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.22.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.20.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.19.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.18.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.17.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.16.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.15.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.14.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.13 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.12 vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.11.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb
logstash-output-scalyr-0.1.10.beta vendor/bundle/jruby/2.5.0/gems/logstash-core-5.6.4-java/lib/logstash/timestamp.rb