Module: Mutant::Result::Session::Timestamp Private

Included in:
Mutant::Result::Session
Defined in:
lib/mutant/result/session.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Extract timestamp from UUIDv7 session_id

Instance Method Summary collapse

Instance Method Details

#timestampTime

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Time)


10
11
12
13
# File 'lib/mutant/result/session.rb', line 10

def timestamp
  ms = session_id.delete('-')[0, 12].to_i(16)
  Time.at(ms / 1000.0).utc
end