Alright so my question is, how can I make a program that basically executes the rest of the program at for example 12pm. For example some non realistic code:
#include <stdio.h>
#include <time.h>
int main()
{
Get_time() //Gets system time
if(time() == 254pm ){ //if time is 2:54pm
printf("Time: 2:54pm\n");
}
else printf("Program can not execute at this time.\n");
return 0;
}
Does anyone know how I can do something similar?
Use
localtimeto get the current time.