~ubuntu-branches/ubuntu/quantal/aria2/quantal

« back to all changes in this revision

Viewing changes to src/Peer.cc

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry
  • Date: 2011-11-08 20:25:08 UTC
  • mfrom: (2.5.7 sid)
  • Revision ID: package-import@ubuntu.com-20111108202508-scfph8rj6tz0cckk
Tags: 1.13.0-1
* New upstream version:
  + Depends on libgcrypt11 (>= 1.5.0-3) (Closes: #642989)

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
Peer::Peer(std::string ipaddr, uint16_t port, bool incoming):
51
51
  ipaddr_(ipaddr),
52
52
  port_(port),
53
 
  firstContactTime_(global::wallclock),
 
53
  firstContactTime_(global::wallclock()),
54
54
  badConditionStartTime_(0),
55
55
  seeder_(false),
56
56
  res_(0),
326
326
 
327
327
void Peer::startBadCondition()
328
328
{
329
 
  badConditionStartTime_ = global::wallclock;
 
329
  badConditionStartTime_ = global::wallclock();
330
330
}
331
331
 
332
332
bool Peer::isGood() const
333
333
{
334
334
  return badConditionStartTime_.
335
 
    difference(global::wallclock) >= BAD_CONDITION_INTERVAL;
 
335
    difference(global::wallclock()) >= BAD_CONDITION_INTERVAL;
336
336
}
337
337
 
338
338
uint8_t Peer::getExtensionMessageID(const std::string& name) const