るりまサーチ

最速Rubyリファレンスマニュアル検索!
21件ヒット [1-21件を表示] (0.013秒)
トップページ > クエリ:done[x] > 種類:モジュール関数[x]

別のキーワード

  1. rubygems/user_interaction done
  2. imap idle_done
  3. net/imap idle_done
  4. silentprogressreporter done
  5. simpleprogressreporter done

ライブラリ

モジュール

検索結果

Timeout.#timeout(sec, exception_class = nil) {|i| ... } -> object (7.0)

ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。

..."($RANDOM/$M)"
c=$(echo "$S;$x^2+$y^2 < 1.0" | bc)
echo $x $y $c
if [ $c -eq 1 ]
then
let m1++
else
let m2++
fi
done

SHELL_EOT
}

File.chmod(0755, "loop.sh")
t = 10 # 10 秒でタイムアウト
begin
pid = nil
com = nil
Timeout.timeout(t)...

Timeout.#timeout(sec, exception_class, message) {|i| ... } -> object (7.0)

ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。

..."($RANDOM/$M)"
c=$(echo "$S;$x^2+$y^2 < 1.0" | bc)
echo $x $y $c
if [ $c -eq 1 ]
then
let m1++
else
let m2++
fi
done

SHELL_EOT
}

File.chmod(0755, "loop.sh")
t = 10 # 10 秒でタイムアウト
begin
pid = nil
com = nil
Timeout.timeout(t)...