Class: LogStash::Timestamp

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/logstash/timestamp.rb

Instance Method Summary collapse

Instance Method Details

#+(other) ⇒ Object

TODO (colin) implement in Java



17
18
19
# File 'lib/logstash/timestamp.rb', line 17

def +(other)
  self.time + other
end

#-(value) ⇒ Object

TODO (colin) implement in Java



22
23
24
# File 'lib/logstash/timestamp.rb', line 22

def -(value)
  self.time - (value.is_a?(Timestamp) ? value.time : value)
end

#<=>(other) ⇒ Object

TODO (colin) implement in Java



12
13
14
# File 'lib/logstash/timestamp.rb', line 12

def <=>(other)
  self.time <=> other.time
end