set a timer to seconds seconds. use ITIMER_PROF to make the itimer send a SIGPRO
    struct itimerval timer;
    struct timeval val_next;
    struct timeval val_curr;
    val_next.tv_sec = 0;
    val_next.tv_usec = 0;
    val_curr.tv_sec = seconds;
    val_curr.tv_usec = 0;
    timer.it_interval = val_next;
    timer.it_value = val_curr;

    setitimer(ITIMER_PROF, &timer, NULL);
