Improved performance for background task tick counter.

This commit is contained in:
root 2020-08-01 16:35:42 -05:00
parent a3d8567d2c
commit 0ef68d6aea

View File

@ -70,10 +70,10 @@ void background_callback_add(background_callback_t *cb, background_callback_fun
static bool in_background_callback;
void background_callback_run_all() {
last_background_tick = port_get_raw_ticks(NULL);
if (!callback_head) {
return;
}
last_background_tick = port_get_raw_ticks(NULL);
CALLBACK_CRITICAL_BEGIN;
if (in_background_callback) {
CALLBACK_CRITICAL_END;