Code:
while(true)
{
	if (system uptime % 5 == 0)
	{
		//do stuff
	}
}
Is there a better way to do this than with the system up time? (Is there an actual command in C++ to perform an action every x seconds?)