Skip to content

K.Timing ​

Functions ​

K.Timing.Wait ​

lua
K.Timing.Wait(seconds: number?): number

K.Timing.After ​

lua
K.Timing.After(seconds: number, callback: () -> ())

Runs callback once after seconds. Returns a timer with :Cancel().

K.Timing.Every ​

lua
K.Timing.Every(seconds: number, callback: () -> ())

Runs callback every seconds, forever. Returns a loop with :Stop(). An error in one run doesn't stop the loop.

K.Timing.Cooldown ​

lua
K.Timing.Cooldown(...: any): boolean

Cooldown(owner, key, seconds) or Cooldown(key, seconds) for a shared one. Returns true and starts the cooldown if it's ready, false if it's still cooling down.

K.Timing.Debounce ​

lua
K.Timing.Debounce<A...>(callback: (A...) -> (), seconds: number): (A...) -> ()

Wraps a function so extra calls within seconds of the last accepted one are ignored.

Generated from src/Corode/Timing.luau.

Corode 0.13.0 · MIT License