From 5415cd9d07522fbdff23a69ebc0d9eccc26821b3 Mon Sep 17 00:00:00 2001 From: B14CK313 Date: Wed, 14 Jul 2021 16:26:07 +0200 Subject: Fixed smallclock plugin eating cpu The plugin uses coroutines but did not yield a value, thus the coroutine was called way more often than necessary Fixed it by simply yielding 1, so it only gets called once per second --- plugins/smallclock.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/smallclock.lua b/plugins/smallclock.lua index 8742b07..5c76160 100644 --- a/plugins/smallclock.lua +++ b/plugins/smallclock.lua @@ -9,7 +9,7 @@ core.add_thread(function() while true do local t = os.date("*t") time = string.format("%02d:%02d", t.hour, t.min) - coroutine.yield() + coroutine.yield(1) end end) -- cgit v1.2.3