Class: VPI::S_vpi_time

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-vpi/core/struct.rb

Instance Method Summary collapse

Instance Method Details

#integerObject Also known as: to_i

Returns the high and low portions of this time as a single 64-bit integer.



10
11
12
# File 'lib/ruby-vpi/core/struct.rb', line 10

def integer
  (self.high << INTEGER_BITS) | self.low
end

#integer=(aValue) ⇒ Object

Sets the high and low portions of this time from the given 64-bit integer.



16
17
18
19
# File 'lib/ruby-vpi/core/struct.rb', line 16

def integer= aValue
  self.low  = aValue & INTEGER_MASK
  self.high = (aValue >> INTEGER_BITS) & INTEGER_MASK
end