#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
void *t1(){
long tid=9;
printf("thread ID %ld",tid);
}
void *t2(){
long tid=10;
printf("thread ID %ld",tid);
}
int main()
{
pthread_t thread1,thread2;
int rc;
int i=0;
rc =pthread_create(&thread1,NULL,t1,NULL);
if(rc)
{
printf("ERROR");
exit();
}
pthread_create(&thread2,NULL,t2,NULL);
return 0;
}
This is where I am at, I have created the threads and executed it but I don't know how to call those functions based on a timer.