error: lib/gears/timer.lua:94: bad argument #3 to 'timeout_add' (number has no integer representation)

This commit is contained in:
Uli Schlachter 2020-08-03 18:09:53 +02:00
parent 1377880611
commit 4dc4b7d4d3
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ function timer:start()
gdebug.print_error(traceback("timer already started")) gdebug.print_error(traceback("timer already started"))
return return
end end
self.data.source_id = glib.timeout_add(glib.PRIORITY_DEFAULT, self.data.timeout * 1000, function() self.data.source_id = glib.timeout_add(glib.PRIORITY_DEFAULT, math.ceil(self.data.timeout * 1000), function()
protected_call(self.emit_signal, self, "timeout") protected_call(self.emit_signal, self, "timeout")
return true return true
end) end)