(trunk gtk) #1585: use g_timeout_add_seconds() where appropriate to group timers together for fewer scheduled wakeups

This commit is contained in:
Charles Kerr
2008-12-22 05:39:03 +00:00
parent d142a075c4
commit e44239fc4e
11 changed files with 29 additions and 13 deletions

View File

@@ -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
}