Because `led_sync` is a major cause of slowness, do not sync every cycle. In most cases, it is pointless to sync 100 times a second, about 60 - or even 30 - may be more than enough. For this reason, introduce a timer, and a settable delay: we'll only call `led_sync` once the delay's up. It can be set to 0 to call it every time, but defaults to 16 (for about 62 syncs/sec), as a safe bet. This speeds the loop up dramatically, except for the few exceptions where sync is called. Fixes #1. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>pull/365/head
parent
1a8ce8cab1
commit
559eab96ae
Loading…
Reference in new issue