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; }
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; }
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; }