Skip to content

Commit 0ef68d6

Browse files
committed
Improved performance for background task tick counter.
1 parent a3d8567 commit 0ef68d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

supervisor/shared/background_callback.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ void background_callback_add(background_callback_t *cb, background_callback_fun
7070

7171
static bool in_background_callback;
7272
void background_callback_run_all() {
73-
last_background_tick = port_get_raw_ticks(NULL);
7473
if (!callback_head) {
7574
return;
7675
}
76+
last_background_tick = port_get_raw_ticks(NULL);
7777
CALLBACK_CRITICAL_BEGIN;
7878
if (in_background_callback) {
7979
CALLBACK_CRITICAL_END;

0 commit comments

Comments
 (0)