diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-03-09 12:24:01 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-03-09 12:24:01 +0000 |
| commit | 032c7c28083e17bdcfd763b3cf81447b06a07978 (patch) | |
| tree | e5cc5ceb050773165df41eb7f0aed3f2a48205a0 /src/SpeedCalc.h | |
| parent | ca3f6e57f35c67f67c3b4f64cedded8ca23237e8 (diff) | |
2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
type cleanup for allmost all remaining files.
Diffstat (limited to 'src/SpeedCalc.h')
| -rw-r--r-- | src/SpeedCalc.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/SpeedCalc.h b/src/SpeedCalc.h index 28e6c59a..c9677ee1 100644 --- a/src/SpeedCalc.h +++ b/src/SpeedCalc.h @@ -42,14 +42,14 @@ namespace aria2 { class SpeedCalc { private: - int64_t lengthArray[2]; - int32_t sw; + uint64_t lengthArray[2]; + int sw; Time cpArray[2]; - int32_t maxSpeed; - int32_t prevSpeed; + unsigned int maxSpeed; + unsigned int prevSpeed; Time start; - int64_t accumulatedLength; - int32_t nextInterval; + uint64_t accumulatedLength; + time_t nextInterval; bool isIntervalOver() const; void changeSw(); @@ -63,17 +63,17 @@ public: /** * Returns download/upload speed in byte per sec */ - int32_t calculateSpeed(); + unsigned int calculateSpeed(); - int32_t calculateSpeed(const struct timeval& now); + unsigned int calculateSpeed(const struct timeval& now); - int32_t getMaxSpeed() const { + unsigned int getMaxSpeed() const { return maxSpeed; } - int32_t getAvgSpeed() const; + unsigned int getAvgSpeed() const; - void update(int bytes); + void update(size_t bytes); void reset(); }; |
