class Sys::Proc

rubocop:disable Style/Documentation

Operations on current process

@see man7.org/linux/man-pages/man2/prctl.2.html @see www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html

Constants

VERSION

Public Class Methods

methods() click to toggle source

Get available methods

@return [Array<Symbol>]

Calls superclass method
# File lib/sys/proc.rb, line 46
def methods
  super() + new.methods
end
new(system = nil) click to toggle source

@param [String|Symbol] system

# File lib/sys/proc.rb, line 38
def initialize(system = nil)
  @system = system
end
public_methods() click to toggle source

Get available public methods

@return [Array<Symbol>]

Calls superclass method
# File lib/sys/proc.rb, line 53
def public_methods
  super() + new.public_methods
end

Public Instance Methods

pid() click to toggle source
# File lib/sys/proc.rb, line 58
def pid
  $PROCESS_ID
end
time() click to toggle source

Time in seconds since system boot

@see blog.dnsimple.com/2018/03/elapsed-time-with-ruby-the-right-way/ @return [Float]

# File lib/sys/proc.rb, line 66
def time
  Process.clock_gettime(Process::CLOCK_MONOTONIC)
end