Sha256: 937c3d7ce113282facdb7f08b2ddf8c4fa39c585bc31c2ab5c7057d3cd6d930d
Contents?: true
Size: 484 Bytes
Versions: 12
Compression:
Stored size: 484 Bytes
Contents
module Pione module Util # CPU is a name space for CPU related functions. module CPU # Return CPU core number in this machine. This method tries to find it by # using sys-cpu gem, but return 1 if something bad. # # @return [Integer] # CPU core nunmber def core_number begin [Sys::CPU.processors.size, 1].max rescue Object 1 end end module_function :core_number end end end
Version data entries
12 entries across 12 versions & 1 rubygems