るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.105秒)

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer chr
  5. integer new

ライブラリ

キーワード

検索結果

Etc.#nprocessors -> Integer (310.0)

有効な CPU コア数を返します。

...有効な CPU コア数を返します。

//emlist[][ruby]{
require 'etc'
p Etc.nprocessors #=> 4
//}...

Etc.#sysconf(name) -> Integer | nil (310.0)

sysconf(3) で取得したシステム設定変数の値を返します。

...されていない
場合)

@param name Etc モジュールの SC_ で始まる定数のいずれかを指定します。

//emlist[][ruby]{
require "etc"
Etc
.sysconf(Etc::SC_ARG_MAX) # => 2097152

# Number of processors.
# It is not standardized.
Etc
.sysconf(Etc::SC_NPROCESSORS_ONLN) # => 4
//}...