Class: Time

Inherits:
Object show all
Defined in:
lib/runtime/events.rb

Overview

The Time class

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.msObject



31
32
33
# File 'lib/runtime/events.rb', line 31

def self.ms
  self.now.to_ms
end

.nsObject



27
28
29
# File 'lib/runtime/events.rb', line 27

def self.ns
  self.now.to_f
end

.sObject



35
36
37
# File 'lib/runtime/events.rb', line 35

def self.s
  self.now.to_i
end

Instance Method Details

#to_msObject



23
24
25
# File 'lib/runtime/events.rb', line 23

def to_ms
  (self.to_f * 1000.0).to_i
end