Sha256: 3744c37c59f1ebf5959e306af3900c9d54444fb8d72c2e5cee1dd6b6c1cfaa11
Contents?: true
Size: 502 Bytes
Versions: 4
Compression:
Stored size: 502 Bytes
Contents
if RUBY_PLATFORM == "java" java_import 'java.lang.System' module Timing def self.start TimingContext.new end class TimingContext def initialize reset! end def reset! @start = @last_tick = System.nano_time end def tick rt = System.nano_time - @last_tick @last_tick = System.nano_time rt end def stop rt = System.nano_time - @start reset! rt end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
liquid-ext-3.5.3 | lib/liquid/timing.rb |
liquid-ext-3.5.2 | lib/liquid/timing.rb |
liquid-ext-3.5.0 | lib/liquid/timing.rb |
liquid-ext-3.4.2 | lib/liquid/timing.rb |