add_once


Description:

[ Version ( since = "2.74" ) ]
public uint add_once (uint interval, SourceOnceFunc function)

Sets a function to be called after interval milliseconds have elapsed, with the default priority, g_priority_default.

The given function is called once and then the source will be automatically removed from the main context.

This function otherwise behaves like g_timeout_add.

Parameters:

interval

the time after which the function will be called, in milliseconds (1/1000ths of a second)

function

function to call

data

data to pass to function

Returns:

the ID (greater than 0) of the event source


Namespace: GLib.Timeout
Package: glib-2.0