Browse Source

Okay fine you're named tim now;

bjorn 5 years ago
parent
commit
861807b474
3 changed files with 6 additions and 6 deletions
  1. 2 2
      api/init.lua
  2. 2 2
      api/lovr/graphics/tick.lua
  3. 2 2
      api/lovr/graphics/tock.lua

+ 2 - 2
api/init.lua

@@ -9718,7 +9718,7 @@ return {
           },
           },
           examples = {
           examples = {
             {
             {
-              code = "function lovr.draw()\n  lovr.graphics.tick('mytimer')\n\n  -- Draw a bunch of cubes\n  for x = -4, 4 do\n    for y = -4, 4 do\n      for z = -4, 4 do\n        lovr.graphics.cube('fill', x, y, z, .2)\n      end\n    end\n  end\n\n  print('rendering took ' .. (lovr.graphics.tock('mytimer') or 0) .. ' seconds')\nend"
+              code = "function lovr.draw()\n  lovr.graphics.tick('tim')\n\n  -- Draw a bunch of cubes\n  for x = -4, 4 do\n    for y = -4, 4 do\n      for z = -4, 4 do\n        lovr.graphics.cube('fill', x, y, z, .2)\n      end\n    end\n  end\n\n  print('it took ' .. (lovr.graphics.tock('tim') or 0) .. ' seconds')\nend"
             }
             }
           },
           },
           notes = "The timer can be stopped by calling `lovr.graphics.tock` using the same name.  All drawing commands between the tick and the tock will be timed.  It is not possible to nest calls to tick and tock.\n\nGPU timers are not supported on all systems.  Check the `timers` feature using `lovr.graphics.getFeatures` to see if it is supported on the current system."
           notes = "The timer can be stopped by calling `lovr.graphics.tock` using the same name.  All drawing commands between the tick and the tock will be timed.  It is not possible to nest calls to tick and tock.\n\nGPU timers are not supported on all systems.  Check the `timers` feature using `lovr.graphics.getFeatures` to see if it is supported on the current system."
@@ -9754,7 +9754,7 @@ return {
           },
           },
           examples = {
           examples = {
             {
             {
-              code = "function lovr.draw()\n  lovr.graphics.tick('mytimer')\n\n  -- Draw a bunch of cubes\n  for x = -4, 4 do\n    for y = -4, 4 do\n      for z = -4, 4 do\n        lovr.graphics.cube('fill', x, y, z, .2)\n      end\n    end\n  end\n\n  print('rendering took ' .. (lovr.graphics.tock('mytimer') or 0) .. ' seconds')\nend"
+              code = "function lovr.draw()\n  lovr.graphics.tick('tim')\n\n  -- Draw a bunch of cubes\n  for x = -4, 4 do\n    for y = -4, 4 do\n      for z = -4, 4 do\n        lovr.graphics.cube('fill', x, y, z, .2)\n      end\n    end\n  end\n\n  print('it took ' .. (lovr.graphics.tock('tim') or 0) .. ' seconds')\nend"
             }
             }
           },
           },
           notes = "All drawing commands between tick and tock will be timed.  It is not possible to nest calls to tick and tock.\n\nThe results are delayed, and might be `nil` for the first few frames.  This function returns the most recent available timer value.\n\nGPU timers are not supported on all systems.  Check the `timers` feature using `lovr.graphics.getFeatures` to see if it is supported on the current system."
           notes = "All drawing commands between tick and tock will be timed.  It is not possible to nest calls to tick and tock.\n\nThe results are delayed, and might be `nil` for the first few frames.  This function returns the most recent available timer value.\n\nGPU timers are not supported on all systems.  Check the `timers` feature using `lovr.graphics.getFeatures` to see if it is supported on the current system."

+ 2 - 2
api/lovr/graphics/tick.lua

@@ -20,7 +20,7 @@ return {
   ]],
   ]],
   example = [[
   example = [[
     function lovr.draw()
     function lovr.draw()
-      lovr.graphics.tick('mytimer')
+      lovr.graphics.tick('tim')
 
 
       -- Draw a bunch of cubes
       -- Draw a bunch of cubes
       for x = -4, 4 do
       for x = -4, 4 do
@@ -31,7 +31,7 @@ return {
         end
         end
       end
       end
 
 
-      print('rendering took ' .. (lovr.graphics.tock('mytimer') or 0) .. ' seconds')
+      print('it took ' .. (lovr.graphics.tock('tim') or 0) .. ' seconds')
     end
     end
   ]],
   ]],
   related = {
   related = {

+ 2 - 2
api/lovr/graphics/tock.lua

@@ -28,7 +28,7 @@ return {
   ]],
   ]],
   example = [[
   example = [[
     function lovr.draw()
     function lovr.draw()
-      lovr.graphics.tick('mytimer')
+      lovr.graphics.tick('tim')
 
 
       -- Draw a bunch of cubes
       -- Draw a bunch of cubes
       for x = -4, 4 do
       for x = -4, 4 do
@@ -39,7 +39,7 @@ return {
         end
         end
       end
       end
 
 
-      print('rendering took ' .. (lovr.graphics.tock('mytimer') or 0) .. ' seconds')
+      print('it took ' .. (lovr.graphics.tock('tim') or 0) .. ' seconds')
     end
     end
   ]],
   ]],
   related = {
   related = {