Added in defaults for dirwatch.

This commit is contained in:
Adam Harrison 2022-06-01 18:36:00 -04:00
parent d390eb248e
commit 67066fc93a
1 changed files with 2 additions and 2 deletions

View File

@ -110,8 +110,8 @@ function dirwatch:check(change_callback, scan_time, wait_time)
self.scanned[directory] = new_modified
end
end
if system.get_time() - start_time > scan_time then
coroutine.yield(wait_time)
if system.get_time() - start_time > (scan_time or 0.01) then
coroutine.yield(wait_time or 0.01)
start_time = system.get_time()
end
end