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

[View source]

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

[View source]

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

def self.pid
  0
end

.timesObject

[View source]

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