Sha256: 11397d4d91085799ccd126744fa6d4b4c63c38a60643123eda5d0efa6d3f4b8b
Contents?: true
Size: 438 Bytes
Versions: 19
Compression:
Stored size: 438 Bytes
Contents
#!/usr/bin/env ruby # (c) Copyright IBM Corp. 2021 # (c) Copyright Instana Inc. 2017 require "bundler" Bundler.require(:default) require "benchmark" # Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond) Benchmark.bm do |x| x.report("Time.now: ") { 1_000_000.times { (Time.now.to_f * 1000).floor } } x.report("get_clocktime:") { 1_000_000.times { Process.clock_gettime(Process::CLOCK_REALTIME, :millisecond) } } end
Version data entries
19 entries across 19 versions & 1 rubygems