3件ヒット
[1-3件を表示]
(0.035秒)
検索結果
先頭3件
-
Socket
:: Constants :: SO _ TIMESTAMPNS -> Integer (72610.0) -
@todo Receive nanosecond timestamp with datagrams (timespec)。
...@todo
Receive nanosecond timestamp with datagrams (timespec)。
@see Socket::Constants::SO_TIMESTAMP,
Socket::AncillaryData#timestamp... -
Socket
:: SO _ TIMESTAMPNS -> Integer (72610.0) -
@todo Receive nanosecond timestamp with datagrams (timespec)。
...@todo
Receive nanosecond timestamp with datagrams (timespec)。
@see Socket::Constants::SO_TIMESTAMP,
Socket::AncillaryData#timestamp... -
Socket
:: AncillaryData # timestamp -> Time (18676.0) -
タイムスタンプ制御メッセージに含まれる時刻を Time オブジェクト で返します。
...以下のいずれかです。
* SOL_SOCKET/SCM_TIMESTAMP (micro second) GNU/Linux, FreeBSD, NetBSD, OpenBSD, Solaris, MacOS X
* SOL_SOCKET/SCM_TIMESTAMPNS (nano second) GNU/Linux
* SOL_SOCKET/SCM_BINTIME (2**(-64) second) FreeBSD
require 'socket'
Addrinfo.udp("127.0.0.1", 0).bind {|s......1|
Addrinfo.udp("127.0.0.1", 0).bind {|s2|
s1.setsockopt(:SOCKET, :TIMESTAMP, true)
s2.send "a", 0, s1.local_address
ctl = s1.recvmsg.last
p ctl
#=> #<Socket::AncillaryData: INET SOCKET TIMESTAMP 2009-02-24 17:35:46.775581>
t = ctl.timestamp
p t......00
p t.usec #=> 775581
p t.nsec #=> 775581000
}
}
@see Socket::Constants::SCM_TIMESTAMP,
Socket::Constants::SCM_TIMESTAMPNS,
Socket::Constants::SCM_BINTIME,
Socket::Constants::SO_TIMESTAMP,
Socket::Constants::SO_TIMESTAMPNS,
Socket::Constants::SO_BINTIME...