module Time::_Timeout
A type thatβs used for timeouts.
All numeric types implement this, but custom classes can also implement it if desired.
Usage of Time::_Timeout is fairly common throughout the stdlib, such as in Kernel#sleep, IO#timeout=, and TCPSocket#newβs connet_timeout field.
Public Instance Methods
(1) → [ int, _TimeoutNSecs ]
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/core/time.rbs, line 458
def divmod: (1) -> [int, _TimeoutNSecs]
Returns [seconds, nanoseconds].
The seconds should be a whole number of seconds, whereas the nanoseconds should be smaller than one. For example, 3.125.divmod(1) would yield [3, 0.125]