Class: Process

Inherits:
Object show all
Defined in:
opal/opal/corelib/process.rb

Constant Summary

CLOCK_REALTIME =
0
CLOCK_MONOTONIC =
1

Class Method Summary collapse

Class Method Details

.clock_gettime(clock_id, unit = nil) ⇒ Object


14
15
16
# File 'opal/opal/corelib/process.rb', line 14

def self.clock_gettime(clock_id, unit = nil)
  Time.now.to_f
end

.pidObject


5
6
7
# File 'opal/opal/corelib/process.rb', line 5

def self.pid
  0
end

.timesObject


9
10
11
12
# File 'opal/opal/corelib/process.rb', line 9

def self.times
  t = Time.now.to_f
  Benchmark::Tms.new(t, t, t, t, t)
end