i want to write a program which display alert message whenever 15 mins are over.But i am not finding solution of my problem using waitforexit() or delay() functions.
#include<time.h>
#include<stdio.h>
#include<dos.h>
#include<conio.h>
void main(void)
{
time_t timer;
struct tm *tblock;
time_t t;
//timeout=18000;
/* gets time of day */
timer = time(NULL);
/* converts date/time to a structure */
tblock = localtime(&timer);
t = time(NULL);
printf("Local time is: %s", asctime(tblock));
printf("The number of seconds since January 1, 1970 is %ld",t);
while(1)
{
sleep(150);
printf("\n\n\n\n**********************times up************************\n\n");
getch();
};
}