Skip to content

Commit

Permalink
background: Fine-tune sleep times
Browse files Browse the repository at this point in the history
This seems to work a little bit better than 30 + 30. It still gives
apps a grace time, but reports their background state in reasonably
responsive of a time.
  • Loading branch information
GeorgesStavracas committed Oct 12, 2022
1 parent b100ac0 commit 51a10c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/background.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,10 +647,11 @@ background_monitor (gpointer data)
{
g_main_context_iteration (monitor_context, TRUE);
/* We check twice, to avoid killing unlucky apps hit at a bad time */
sleep (30);
sleep (5);
check_background_apps ();
sleep (30);
sleep (25);
check_background_apps ();
sleep (10);
}

g_clear_pointer (&applications, g_hash_table_unref);
Expand Down

0 comments on commit 51a10c1

Please sign in to comment.