mirror of https://github.com/aria2/aria2
2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Renamed member variables * src/TimeSeedCriteria.hpull/1/head
parent
c47eaa5ce3
commit
706230c21f
|
@ -1,3 +1,8 @@
|
||||||
|
2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Renamed member variables
|
||||||
|
* src/TimeSeedCriteria.h
|
||||||
|
|
||||||
2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2010-06-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Renamed member variables
|
Renamed member variables
|
||||||
|
|
|
@ -44,26 +44,26 @@ namespace aria2 {
|
||||||
class TimeSeedCriteria : public SeedCriteria {
|
class TimeSeedCriteria : public SeedCriteria {
|
||||||
private:
|
private:
|
||||||
// How much time the client does seeding in seconds.
|
// How much time the client does seeding in seconds.
|
||||||
time_t duration;
|
time_t _duration;
|
||||||
Timer watch;
|
Timer _watch;
|
||||||
public:
|
public:
|
||||||
TimeSeedCriteria(time_t duration):duration(duration) {}
|
TimeSeedCriteria(time_t duration):_duration(duration) {}
|
||||||
virtual ~TimeSeedCriteria() {}
|
virtual ~TimeSeedCriteria() {}
|
||||||
|
|
||||||
virtual void reset() {
|
virtual void reset() {
|
||||||
watch = global::wallclock;
|
_watch = global::wallclock;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool evaluate() {
|
virtual bool evaluate() {
|
||||||
return watch.difference(global::wallclock) >= duration;
|
return _watch.difference(global::wallclock) >= _duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setDuration(time_t duration) {
|
void setDuration(time_t duration) {
|
||||||
this->duration = duration;
|
_duration = duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t getDuration() const {
|
time_t getDuration() const {
|
||||||
return duration;
|
return _duration;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue