Permalink
Browse files

Add small CPU documentation.

  • Loading branch information...
1 parent b515387 commit eed45b78a10e6d7a17bb6fe43fc1f37d19e73de7 Ryan Scott Lewis committed Nov 21, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/system/cpu.rb
View
@@ -11,6 +11,7 @@ class << self
# The CPU count of the system, including individual CPU cores.
#
# @return [Integer] Count of CPU cores.
+ # @since 0.1.1
def count
return Java::Java.lang.Runtime.getRuntime.availableProcessors if System::Ruby.java?
return File.read('/proc/cpuinfo').scan(/^processor\s*:/).size if File.exist?('/proc/cpuinfo')

0 comments on commit eed45b7

Please sign in to comment.