Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/time_ext.rb

Overview

Borrowed from the SimpleUUID gem

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.stampObject



3
4
5
# File 'lib/time_ext.rb', line 3

def self.stamp
  Time.now.stamp
end

Instance Method Details

#stampObject



7
8
9
# File 'lib/time_ext.rb', line 7

def stamp
  to_i * 1_000_000 + usec
end