Sha256: 3483b29fb1e01e1116399c8c27c850b804204985c0342973a8e1c17c88581212

Contents?: true

Size: 178 Bytes

Versions: 3

Compression:

Stored size: 178 Bytes

Contents

java_import 'java.lang.System'

module Benchmark
  def realtime(&block)
    t0 = System.nano_time
    yield
    ((System.nano_time - t0).to_f / 1_000_000_000).round(3)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
liquid-ext-1.0.2 lib/liquid/benchmark.rb
liquid-ext-1.0.1 lib/liquid/benchmark.rb
liquid-ext-1.0.0 lib/liquid/benchmark.rb