Sha256: 1dc1599e78290563318d2e8c382d2c8cff5ede16503e1264dd47d3674641c3d0
Contents?: true
Size: 848 Bytes
Versions: 4
Compression:
Stored size: 848 Bytes
Contents
# frozen_string_literal: true require "securerandom" unless defined?(SecureRandom) module Lite module Command module Internals module Runtimes def index @index ||= context.index ||= 0 end def cmd_id @cmd_id ||= context.cmd_id ||= SecureRandom.uuid end private def assign_execution_cmd_id @cmd_id = context.cmd_id ||= cmd_id end def increment_execution_index @index = context.index = index.next end def start_monotonic_time @start_monotonic_time ||= Utils.monotonic_time end def stop_monotonic_time @stop_monotonic_time ||= Utils.monotonic_time end def runtime stop_monotonic_time - start_monotonic_time end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems