Class: RabbitMQ::FFI::Timeval Private
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- RabbitMQ::FFI::Timeval
- Defined in:
- lib/rabbitmq/ffi.rb,
lib/rabbitmq/ffi/ext/timeval.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class Attribute Summary collapse
- .zero ⇒ Object readonly private
Class Method Summary collapse
- .from(seconds) ⇒ Object private
Class Attribute Details
.zero ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 |
# File 'lib/rabbitmq/ffi/ext/timeval.rb', line 14 def zero @zero end |
Class Method Details
.from(seconds) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
6 7 8 9 10 11 |
# File 'lib/rabbitmq/ffi/ext/timeval.rb', line 6 def self.from(seconds) obj = new obj[:tv_sec] = Integer(seconds) obj[:tv_usec] = Integer(Float(seconds) * 1_000_000) obj end |