Exemple #1
0
void Houses::check()
{
	uint64_t start = OTSYS_TIME();
	std::clog << "> Checking houses..." << std::endl;

	time_t currentTime = time(NULL);
	for(HouseMap::iterator it = houseMap.begin(); it != houseMap.end(); ++it)
		payHouse(it->second, currentTime, 0);

	std::clog << "Houses checked in " << (OTSYS_TIME() - start) / (1000.) << " seconds." << std::endl;
}
Exemple #2
0
bool Houses::payHouses()
{
  if(rentPeriod == RENTPERIOD_NEVER){
    return true;
  }

  time_t currentTime = std::time(NULL);
  for(HouseMap::iterator it = houseMap.begin(); it != houseMap.end(); ++it){
    payHouse(it->second, currentTime);
  }

  return true;
}
Exemple #3
0
void Houses::payHouses()
{
	if(rentPeriod == RENTPERIOD_NEVER)
		return;

	uint64_t start = OTSYS_TIME();
	std::clog << "> Paying houses..." << std::endl;

	time_t currentTime = time(NULL);
	for(HouseMap::iterator it = houseMap.begin(); it != houseMap.end(); ++it)
		payHouse(it->second, currentTime, 0);

	std::clog << "> Houses paid in " << (OTSYS_TIME() - start) / (1000.) << " seconds." << std::endl;
}