mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 23:10:18 +01:00
shared: add nm_g_timeout_source_new_seconds()
This commit is contained in:
parent
fc66ad70d5
commit
265a5879ae
2 changed files with 23 additions and 0 deletions
|
|
@ -4520,6 +4520,22 @@ nm_g_timeout_source_new (guint timeout_msec,
|
|||
return source;
|
||||
}
|
||||
|
||||
GSource *
|
||||
nm_g_timeout_source_new_seconds (guint timeout_sec,
|
||||
int priority,
|
||||
GSourceFunc func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify destroy_notify)
|
||||
{
|
||||
GSource *source;
|
||||
|
||||
source = g_timeout_source_new_seconds (timeout_sec);
|
||||
if (priority != G_PRIORITY_DEFAULT)
|
||||
g_source_set_priority (source, priority);
|
||||
g_source_set_callback (source, func, user_data, destroy_notify);
|
||||
return source;
|
||||
}
|
||||
|
||||
GSource *
|
||||
nm_g_unix_signal_source_new (int signum,
|
||||
int priority,
|
||||
|
|
|
|||
|
|
@ -1349,6 +1349,13 @@ GSource *nm_g_timeout_source_new (guint timeout_msec,
|
|||
GSourceFunc func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify destroy_notify);
|
||||
|
||||
GSource *nm_g_timeout_source_new_seconds (guint timeout_sec,
|
||||
int priority,
|
||||
GSourceFunc func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify destroy_notify);
|
||||
|
||||
GSource *nm_g_unix_fd_source_new (int fd,
|
||||
GIOCondition io_condition,
|
||||
int priority,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue