Hello. I need help with some code that i am writing for a small text rpg. Its basically a clock that simulates a day, which will be 24 minutes instead of 24 hours. 1 second will equal one minute, and 1 minute will equal one hour. The clock will start from 12:00 and go to 12:00. I need ideas on how to write this code. This is code that i have come
time_t rawtime;
int hours;
int minutes;
int seconds;
struct tm * timeinfo;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
if(timeinfo->tm_hour > 12)
timeinfo->tm_hour = timeinfo->tm_hour - 12;
hours = timeinfo->tm_hour;
minutes = timeinfo->tm_min;
seconds = timeinfo->tm_sec;