Method: UUID#time

Defined in:
lib/cast_off/compile/namespace/uuid.rb

#timeObject

The timestamp of this UUID. Throws RageError if that time exceeds UNIX time range



217
218
219
220
221
222
223
224
225
226
227
228
229
230
# File 'lib/cast_off/compile/namespace/uuid.rb', line 217

def time
  a = unpack
  tl = a[0]
  tm = a[1]
  th = a[2] & 0x0FFF
  t = tl
  t += tm << 32
  t += th << 48
  t -= UNIXEpoch
  tv_sec = t / 10_000_000
  t -= tv_sec * 10_000_000
  tv_usec = t / 10
  Time.at tv_sec, tv_usec
end