getDelta.lua 666 B

123456789101112131415161718192021222324
  1. return {
  2. summary = 'Get the time elapsed since the last update.',
  3. description = [[
  4. Returns the time between the last two frames. This is the same value as the `dt` argument
  5. provided to `lovr.update`.
  6. ]],
  7. arguments = {},
  8. returns = {
  9. {
  10. name = 'dt',
  11. type = 'number',
  12. description = 'The delta time, in seconds.'
  13. }
  14. },
  15. notes = [[
  16. The return value of this function will remain the same until `lovr.timer.step` is called. This
  17. function should not be used to measure times for game behavior or benchmarking, use
  18. `lovr.timer.getTime` for that.
  19. ]],
  20. related = {
  21. 'lovr.timer.getTime',
  22. 'lovr.update'
  23. }
  24. }