foo.vala 226 B

1234567891011121314
  1. using GLib;
  2. class Foo : Object
  3. {
  4. public signal bool an_event();
  5. public Foo(MainLoop loop)
  6. {
  7. var time = new TimeoutSource(5000);
  8. time.set_callback(() => {return an_event();});
  9. time.attach(loop.get_context());
  10. }
  11. }