Skip to content

Commit

Permalink
chore(timer): improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
Tieske committed Nov 15, 2024
1 parent f964534 commit c262fad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/copas/timer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ do
-- `opts.params` (optional) this value will be passed to the timer callback, `opts.initial_delay` (optional) the first delay to use, defaults to `delay`.
-- @return timer object, or throws an error on bad input
function timer.new(opts)
assert(opts.delay or -1 >= 0, "delay must be greater than or equal to 0")
assert((opts.delay or -1) >= 0, "delay must be greater than or equal to 0")
assert(type(opts.callback) == "function", "expected callback to be a function")

local callback = function(timer_obj, params)
Expand Down

0 comments on commit c262fad

Please sign in to comment.