Module: PosixPsutil::PsutilHelper
- Included in:
- Network, PlatformSpecificProcess
- Defined in:
- lib/posixpsutil/linux/helper.rb
Overview
This module places all classes can be used both in Process and in other modules. Each platform has its own PsutilHelper module.
Defined Under Namespace
Classes: Connection, Processes
Class Method Summary collapse
Class Method Details
.boot_time ⇒ Object
11 12 13 14 15 |
# File 'lib/posixpsutil/linux/helper.rb', line 11 def self.boot_time IO.readlines('/proc/stat').each do |line| return line.strip.split[1].to_f if line.start_with?('btime') end end |