72件ヒット
[1-72件を表示]
(0.081秒)
クラス
- DateTime (48)
-
File
:: Stat (12) -
Socket
:: AncillaryData (12)
キーワード
- <=> (12)
- sec (12)
-
sec
_ fraction (12) -
second
_ fraction (12)
検索結果
先頭5件
-
DateTime
# second -> Integer (18102.0) -
秒を返します (0-59)。
秒を返します (0-59)。 -
DateTime
# second _ fraction -> Rational (6202.0) -
秒の小数点以下の部分を表す分数を返します。
秒の小数点以下の部分を表す分数を返します。 -
DateTime
# sec _ fraction -> Rational (3102.0) -
秒の小数点以下の部分を表す分数を返します。
秒の小数点以下の部分を表す分数を返します。 -
Socket
:: AncillaryData # timestamp -> Time (3019.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......tsockopt(: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 #=> 2009-02-24 17:35:46 +0900
p t.usec #=> 775581... -
File
:: Stat # <=>(o) -> Integer | nil (3007.0) -
ファイルの最終更新時刻を比較します。self が other よりも 新しければ正の数を、等しければ 0 を古ければ負の数を返します。 比較できない場合は nil を返します。
...:Stat のインスタンスを指定します。
//emlist[][ruby]{
require 'tempfile' # for Tempfile
fp1 = Tempfile.open("first")
fp1.print "古い方\n"
sleep(1)
fp2 = Tempfile.open("second")
fp2.print "新しい方\n"
p File::Stat.new(fp1.path) <=> File::Stat.new(fp2.path) #=> -1
p File::Stat.n......ew(fp2.path) <=> File::Stat.new(fp1.path) #=> 1
p File::Stat.new(fp1.path) <=> fp2.path #=> nil
//}... -
DateTime
# sec -> Integer (3002.0) -
秒を返します (0-59)。
秒を返します (0-59)。