timeout_add_seconds_once_full


Description:


[ Version ( since = "0.0.1" ) ]
public uint timeout_add_seconds_once_full (int priority, ulong seconds, owned SourceOnceFunc function)

Sets a function to be called after a timeout with priority priority.

Correctly calculates the timeout even when the system is suspended in between.

The timeout given is in terms of `CLOCK_BOOTTIME` time, it hence is also correct across suspend and resume. If that doesn't matter use `g_timeout_add_seconds_full` 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

Changed in 0.3.0: Returns 0 when timer setup failed

Parameters:

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 function

notify

function to call when the timeout is removed, or null

Returns:

the ID (greater than 0) of the event source or 0 in case of error.


Namespace: Gm
Package: gmobile