Module: Ruby2D::Benchmark::RenderTimer

Defined in:
lib/ruby2d/benchmark.rb

Overview

Wraps Window#render_objects to accumulate scene-graph draw time. Prepended to the benchmark window's singleton in run.

Instance Method Summary collapse

Instance Method Details

#render_objects(*args) ⇒ Object



54
55
56
57
58
59
# File 'lib/ruby2d/benchmark.rb', line 54

def render_objects(*args)
  t = Ruby2D::Ext.now
  super
ensure
  Clock.render_ns += Ruby2D::Ext.now - t
end