Skip to content

Love.Timer

Yx edited this page Jul 3, 2018 · 1 revision

Timer

Provides high-resolution timing functionality.

Love.Timer.GetAverageDelta()

Returns the average delta time over the last second.

float delta = Timer.GetAverageDelta()

Love.Timer.GetDelta()

Returns the time between the last two frames.

float dt = Timer.GetDelta()

Love.Timer.GetFPS()

Returns the current frames per second.

float fps = Timer.GetFPS()

Love.Timer.GetTime()

Returns the amount of time since some time in the past.

float currentTime = Timer.GetTime()

Love.Timer.Sleep()

Pauses the current thread for the specified amount of time.

Timer.Sleep()

Love.Timer.Step()

Measures the time between two frames.

Timer.Step()