module EGauge
Represents a single register in the
Public Class Methods
parse_time(str)
click to toggle source
# File lib/egauge.rb, line 12 def self.parse_time(str) # Chop off the initial hex flagging if present str = str[2..-1] if str[/^0x/] # Do ruby stuff to convert to 4 byte unsigned int as_int = str.hex # And return as a time... Time.at(as_int).utc end