mirror of
https://github.com/transmission/transmission.git
synced 2025-12-25 04:45:56 +00:00
(trunk gtk) #1585: use g_timeout_add_seconds() where appropriate to group timers together for fewer scheduled wakeups
This commit is contained in:
15
gtk/util.c
15
gtk/util.c
@@ -641,3 +641,18 @@ gtr_button_new_from_stock( const char * stock,
|
||||
return button;
|
||||
}
|
||||
|
||||
/***
|
||||
****
|
||||
***/
|
||||
|
||||
guint
|
||||
gtr_timeout_add_seconds( guint interval,
|
||||
GSourceFunc function,
|
||||
gpointer data )
|
||||
{
|
||||
#if GLIB_CHECK_VERSION( 2,14,0 )
|
||||
return g_timeout_add_seconds( interval, function, data );
|
||||
#else
|
||||
return g_timeout_add( interval*1000, function, data );
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user