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



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

def +(other)
  self.time + other
end

#-(value) ⇒ Object

TODO (colin) implement in Java



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

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

#<=>(other) ⇒ Object

TODO (colin) implement in Java



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

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