Sha256: e0261bf0062699c031ff5aff324e49d487c7fc1496a890e3d67e01cd1d2f568f
Contents?: true
Size: 423 Bytes
Versions: 17
Compression:
Stored size: 423 Bytes
Contents
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
Version data entries
17 entries across 17 versions & 1 rubygems