getDelta.lua 731 B

1234567891011121314151617181920212223242526272829
  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. dt = {
  10. type = 'number',
  11. description = 'The delta time, in seconds.'
  12. }
  13. },
  14. variants = {
  15. {
  16. arguments = {},
  17. returns = { 'dt' }
  18. }
  19. },
  20. notes = [[
  21. The return value of this function will remain the same until `lovr.timer.step` is called. This
  22. function should not be used to measure times for game behavior or benchmarking, use
  23. `lovr.timer.getTime` for that.
  24. ]],
  25. related = {
  26. 'lovr.timer.getTime',
  27. 'lovr.update'
  28. }
  29. }