This commit is contained in:
2026-07-14 13:07:13 +01:00
parent 7a9b44a735
commit a9054b3be4
5 changed files with 31 additions and 14 deletions
+7 -1
View File
@@ -58,12 +58,18 @@ rect.click do
end
App.map_key :mouse_left, :action_name
App.map_key :q, :quit
start = Time.now
c_ = 0.0
c_c = 0
App.update do |delta_time|
if App.pressed?(:quit)
App.exit!
next
end
c_ += delta_time
c_c += 1
@@ -114,4 +120,4 @@ p "Average delta time: #{c_ / c_c}s"
p "Average FPS (real): #{c_c / time}s"
p "Average FPS (from dt): #{c_c / c_}"
p "Time since start (real): #{time}s"
p "Time since start (from dt): #{c_}s"
p "Time since start (from dt): #{c_}s"