Exemple #1
0
 void RoutingTable::GetRefreshList(const unsigned short int &start_kbucket,
                                   const bool &force, std::vector<KadID> *ids) {
     TTimer timer ;
     unsigned int curr_time = static_cast<unsigned int> (timer.system_time());
     for (size_t i = start_kbucket; i < k_buckets_.size(); ++i)
         if (force || curr_time-k_buckets_[i]->last_accessed() > KRefreshTime) {
             ids->push_back(KadID(k_buckets_[i]->range_min(),
                                  k_buckets_[i]->range_max()));
         }
 }