Class: Collectd::Packet::Values::Counter

Inherits:
Part
  • Object
show all
Defined in:
lib/collectd/pkt.rb

Instance Method Summary collapse

Methods inherited from Part

type, #type

Constructor Details

#initialize(c) ⇒ Counter

Returns a new instance of Counter.



78
79
80
# File 'lib/collectd/pkt.rb', line 78

def initialize(c)
  @c = c
end

Instance Method Details

#to_sObject



81
82
83
# File 'lib/collectd/pkt.rb', line 81

def to_s
  [@c >> 32, @c & 0xffffffff].pack("NN")
end