[Vala] repeat every n seconds



Hello friends,

I need run a function indefinitely every N secods, something like this.

using GLib;
int seconds = 5;

bool myfunction(){
    stdout.printf ("ok\n");

    return true;
}


void main () {
    //how run my function every 5 seconds
    myfunction(); // this run only one time
}

I'am new using vala :(
Fin a la injusticia, LIBERTAD AHORA A NUESTROS CINCO COMPATRIOTAS QUE SE ENCUENTRAN INJUSTAMENTE EN PRISIONES 
DE LOS EEUU!
http://www.antiterroristas.cu
http://justiciaparaloscinco.wordpress.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]