Sets a function to be called after a timeout with the default priority, g_priority_default.
Correctly calculates the timeout even when the system is suspended in between. It will wake up the system when needed.
If the process doesn't have enough permissions to wake the system creating the timer will fail. On Linux at least `CAP_WAKE_ALARM` capabilities are needed.
The timeout given is in terms of `CLOCK_BOOTTIME_ALARM` time, it hence is also correct across suspend and resume. If that doesn't matter use `g_timeout_add_seconds` instead.
Note that glib's `g_timeout_add_seconds()` doesn't take system suspend/resume into account: https://gitlab.gnome.org/GNOME/glib/-/issues/2739
| priority |
the priority of the timeout source. Typically this will be in the range between g_priority_default and g_priority_high. |
| seconds |
the timeout in seconds |
| function |
function to call |
| data |
data to pass to |
| notify |
function to call when the timeout is removed, or null |
|
the ID (greater than 0) of the event source or 0 in case of error. |