Class: EaseEngine::MeasurePacket
- Defined in:
- lib/ease_engine/packet.rb
Instance Attribute Summary
Attributes inherited from Packet
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize ⇒ MeasurePacket
constructor
A new instance of MeasurePacket.
- #start ⇒ Object
Methods inherited from Packet
create, creates, #pack, pack_str, pack_uint16, pack_uint32, pack_uint8, #packer, #unpack, unpack_str, unpack_uint16, unpack_uint32, unpack_uint8, #write
Constructor Details
#initialize ⇒ MeasurePacket
Returns a new instance of MeasurePacket.
126 127 128 129 130 131 132 |
# File 'lib/ease_engine/packet.rb', line 126 def initialize super packer :sec, :usec start end |
Instance Method Details
#check ⇒ Object
140 141 142 |
# File 'lib/ease_engine/packet.rb', line 140 def check EaseEngine::Time.new - ::Time.at( @sec, @usec ) end |
#start ⇒ Object
134 135 136 137 138 |
# File 'lib/ease_engine/packet.rb', line 134 def start time = ::Time.new @sec = time.to_i @usec = time.usec end |