Ejemplo n.º 1
0
int main(){
    scheduler.addTask(&hello_task);
    scheduler.addTask(&bye_task);
    while(1){
        scheduler.run();
    }
}
int main(int argc, const char * argv[]) {
    
    Scheduler *scheduler = new Scheduler();
    
    Task *t1 = new Task(scheduler, MillisecondsTime(1000));
    Task *t2 = new Task(scheduler, MillisecondsTime(1000));
    
    scheduler->addTask(MillisecondsTime(5000), t1);
    scheduler->addTask(MillisecondsTime(2000), t2);
    
    scheduler->runTasks();
    
    return 0;
}