Printing Out Time Every Hour

I have made a basic function to print the time every hour. It gets called every tick and will only print if the minutes and seconds are equal to 0. Since it gets called each tick, it prints MANY times and I only want it to print once. I've been stuck with this for about a day now. Someone please help?


Kind of like this:

1
2
3
4
5
6
7
8
        switch (now -> tm_hour)
	{
	case 1:
		if ((now -> tm_min == 0) && (now -> tm_sec == 0))
			cout << "1:00 am" << endl;

		break;
        }
Topic archived. No new replies allowed.