lib/hawatel_ps/windows/proc_fetch.rb
def system_idle_time
          WmiCli.new.query("SELECT KernelModeTime FROM Win32_Process WHERE ProcessId = '0'").each do |idle|
            return (idle.properties[:kernelmodetime].to_i / 10000000)
          end
          return nil
        end
# Calculate cpu time for System Idle Process
# @return [Integer] system idle time in seconds
Calculate cpu time for System Idle Process
Calculate cpu time for System Idle Process
def system_idle_time
          WmiCli.new.query("SELECT KernelModeTime FROM Win32_Process WHERE ProcessId = '0'").each do |idle|
            return (idle.properties[:kernelmodetime].to_i / 10000000)
          end
          return nil
        end
def system_idle_time WmiCli . new . query ( "SELECT KernelModeTime FROM Win32_Process WHERE ProcessId = '0'" ) . each do | idle | return ( idle . properties [ :kernelmodetime ] . to_i / 10000000 ) end return nil end
Calculate cpu time for System Idle Process
Calculate cpu time for System Idle Process
system idle time in seconds
system idle time in seconds
Integer