ライブラリ
- ビルトイン (236)
-
cgi
/ session (11) - csv (11)
- fileutils (33)
- logger (19)
-
net
/ ftp (20) - openssl (11)
- pathname (54)
- profiler (6)
- rake (22)
- shell (36)
-
shell
/ command-processor (36) -
shell
/ filter (36) - timeout (19)
-
webrick
/ httpservlet / filehandler (11) - zlib (22)
クラス
-
CGI
:: Session (11) - CSV (11)
- File (104)
-
File
:: Stat (44) - Logger (19)
-
Net
:: FTP (11) -
Net
:: FTP :: MLSxEntry (9) - Pathname (54)
-
Rake
:: FileCreationTask (11) -
Rake
:: FileTask (11) - Shell (36)
-
Shell
:: CommandProcessor (36) -
Shell
:: Filter (36) -
WEBrick
:: HTTPServlet :: DefaultFileHandler (11) -
Zlib
:: GzipFile (11) -
Zlib
:: GzipWriter (11)
モジュール
-
File
:: Constants (11) - FileUtils (22)
-
GC
:: Profiler (44) - Kernel (22)
- Timeout (19)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - FileUtils (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - NOATIME (11)
-
Profiler
_ _ (6) - Random (11)
- Ruby用語集 (11)
- [] (18)
- atime (62)
- birthtime (41)
- ctime (62)
- facts (9)
- formatter (11)
- lutime (7)
- mtime (84)
- mtime= (11)
- new (30)
-
not
_ modified? (11) - profile (6)
-
raw
_ data (11) - rdoc (11)
-
remove
_ entry _ secure (11) - report (11)
- result (11)
- rss (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 9 feature (11) - test (40)
- timeout (19)
-
total
_ time (11) - touch (11)
- tsort (11)
- utime (40)
検索結果
先頭5件
-
Timeout
. # timeout(sec , exception _ class = nil) {|i| . . . } -> object (9124.0) -
ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。
...sec 秒の期限付きで実行します。
ブロックの実行時間が制限を過ぎたときは例外
Timeout::Error が発生します。
exception_class を指定した場合には Timeout::Error の代わりに
その例外が発生します。
ブロックパラメータ i は sec がは......アウト
require 'timeout'
def calc_pi(min)
loop do
x = rand
y = rand
x**2 + y**2 < 1.0 ? min[0] += 1 : min[1] += 1
end
end
t = 5
min = [ 0, 0]
begin
Timeout.timeout(t){
calc_pi(min)
}
rescue Timeout::Error
puts "timeout"
end
printf......、Kernel.#openを使用するなどの工夫が必要です。
例 外部コマンドのタイムアウト
require 'timeout'
# テスト用のシェルをつくる。
File.open("loop.sh", "w"){|fp|
fp.print <<SHELL_EOT
#!/bin/bash
S="scale=10"
M=32767
trap 'echo "$S; $m1/($m1+... -
Timeout
. # timeout(sec , exception _ class , message) {|i| . . . } -> object (9124.0) -
ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。
...sec 秒の期限付きで実行します。
ブロックの実行時間が制限を過ぎたときは例外
Timeout::Error が発生します。
exception_class を指定した場合には Timeout::Error の代わりに
その例外が発生します。
ブロックパラメータ i は sec がは......アウト
require 'timeout'
def calc_pi(min)
loop do
x = rand
y = rand
x**2 + y**2 < 1.0 ? min[0] += 1 : min[1] += 1
end
end
t = 5
min = [ 0, 0]
begin
Timeout.timeout(t){
calc_pi(min)
}
rescue Timeout::Error
puts "timeout"
end
printf......、Kernel.#openを使用するなどの工夫が必要です。
例 外部コマンドのタイムアウト
require 'timeout'
# テスト用のシェルをつくる。
File.open("loop.sh", "w"){|fp|
fp.print <<SHELL_EOT
#!/bin/bash
S="scale=10"
M=32767
trap 'echo "$S; $m1/($m1+... -
File
:: Constants :: NOATIME -> Integer (9116.0) -
ファイル読み込み時に atime を更新しません。 open(2) で O_ATIME が指定できる場合に使えます。 File.openで使用します。
...ファイル読み込み時に atime を更新しません。
open(2) で O_ATIME が指定できる場合に使えます。
File.openで使用します。
atime が更新されないのは確実ではないということに注意してください。
これは性能のためのオプションで... -
GC
:: Profiler . total _ time -> Float (9107.0) -
GC のプロファイル情報から GC の総計時間を計算し、msec 単位で返します。
...GC のプロファイル情報から GC の総計時間を計算し、msec 単位で返します。
//emlist[例][ruby]{
GC::Profiler.enable
GC.start
GC::Profiler.total_time # => 0.0011530000000000012
//}... -
Shell
# utime(atime , mtime , *filename) -> Integer (6434.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param utime 更新時刻を Time か、起......算時からの経過秒数を数値で指定します。
@see File.utime... -
Shell
:: CommandProcessor # utime(atime , mtime , *filename) -> Integer (6434.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param utime 更新時刻を Time か、起......算時からの経過秒数を数値で指定します。
@see File.utime... -
Shell
:: Filter # utime(atime , mtime , *filename) -> Integer (6434.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列を指定します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param utime 更新時刻を Time か、起......算時からの経過秒数を数値で指定します。
@see File.utime... -
Pathname
# utime(atime , mtime) -> Integer (6334.0) -
File.utime(atime, mtime, self.to_s) と同じです。
...File.utime(atime, mtime, self.to_s) と同じです。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param mtime 更新時刻を Time か、起算時からの経過秒数を数値で指定します。
@see File.utime... -
Shell
# atime(filename) -> Time (6323.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.atime... -
Shell
# ctime(filename) -> Time (6323.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.ctime... -
Shell
# mtime(filename) -> Time (6323.0) -
File クラスにある同名のクラスメソッドと同じです.
...
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.mtime... -
Shell
:: CommandProcessor # atime(filename) -> Time (6323.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.atime... -
Shell
:: CommandProcessor # ctime(filename) -> Time (6323.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.ctime... -
Shell
:: CommandProcessor # mtime(filename) -> Time (6323.0) -
File クラスにある同名のクラスメソッドと同じです.
...
File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.mtime... -
Shell
:: Filter # atime(filename) -> Time (6323.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@see File.atime...