TimeoutSource


Object Hierarchy:

GLib.TimeoutSource GLib.TimeoutSource GLib.TimeoutSource GLib.Source GLib.Source GLib.Source->GLib.TimeoutSource

Description:

[ CCode ( cname = "GSource" ) ]
public class TimeoutSource : Source

Example: Timeout sources:

public static int main (string[] args) {
MainLoop loop = new MainLoop ();
TimeoutSource time = new TimeoutSource (2000);

time.set_callback (() => {
print ("Time!\n");
loop.quit ();
return false;
});

time.attach (loop.get_context ());

loop.run ();
return 0;
}

valac --pkg glib-2.0 GLib.TimeoutSource.vala


Namespace: GLib
Package: glib-2.0

Content:

Creation methods:

Inherited Members: